/* modules.css -- cncrelief.com (2026-10-21 21:26, owner): "Relief page ke top par chhote lambe tab -- Image to Relief,
   Convert File, Trace Vector, Image to Line Artwork, Image to Jali -- aur screen ke sabhi button (History chhod ke)
   bina scroll ke dikhne chahiye". modules.js switches the tabs. */

/* ---------------------------------------------------------------- module tabs (under the header) */
.mod-tabs {
  position: sticky;
  top: 68px;
  z-index: 39;
  background: var(--header-hl, #F5F7F5);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 -36px 10px -36px;
  padding: 8px 36px;
  border-bottom: 1px solid var(--swatch-border, rgba(56, 89, 73, 0.12));
  box-shadow: 0 4px 12px rgba(22, 32, 30, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mod-tab {
  --ic: #2D413A;
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 12px 0 8px; box-sizing: border-box;
  border: 2px solid #C4D2C9; border-radius: 12px; background: #FFFFFF;
  font: 700 13px/1.1 var(--font-display, 'Manrope', sans-serif); color: #101716;
  cursor: pointer; text-align: left; text-decoration: none; min-width: 0;
  box-shadow: 0 3px 8px rgba(22, 32, 30, .04);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.mod-tab:hover { border-color: #9C4B30; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(22, 32, 30, .08); }
.mod-tab .mod-ic {
  flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  color: var(--ic); background: color-mix(in srgb, var(--ic) 13%, #FFFFFF);
}
.mod-tab .mod-ic svg { width: 16px; height: 16px; }
.mod-tab .mod-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mod-tab .mod-tag {
  flex: none; font: 800 8.5px/1 var(--font-mono, monospace); letter-spacing: .08em; padding: 3px 6px; border-radius: 999px;
  background: #EEF2EF; color: #5B6B64; border: 1px solid #D2DFD7;
}
.mod-tab .mod-tag.new { background: #1E6B47; color: #FFFFFF; border-color: #1E6B47; }
.mod-tab.active {
  background: #16201E; border-color: #16201E; color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(22, 32, 30, .22);
}
.mod-tab.active .mod-ic { background: rgba(255, 255, 255, .1); color: var(--ic-on, #F2C14E); }
.mod-tab.active .mod-tag { background: rgba(255, 255, 255, .12); color: #FFFFFF; border-color: transparent; }
.mod-tab[data-mod="relief"]  { --ic: #C8961E; }
.mod-tab[data-mod="convert"] { --ic: #2F6FB0; --ic-on: #8EC1F2; }
.mod-tab[data-mod="trace"]   { --ic: #7A4BB0; --ic-on: #C9A8F0; }
.mod-tab[data-mod="line"]    { --ic: #B0473A; --ic-on: #F2A79C; }
.mod-tab[data-mod="laser"]   { --ic: #E05A47; --ic-on: #FFA89B; }
.mod-tab[data-mod="jali"]    { --ic: #2E8A6B; --ic-on: #8FE0C2; }
.mod-tab[data-mod="split"]   { --ic: #C0592B; --ic-on: #F5B08F; }

/* only one module on screen */
.mod-panel[hidden], .gen-workspace-grid[hidden] { display: none !important; }

/* ---------------------------------------------------------------- one screen, no scroll (History below is fine) */
@media (min-width: 1101px) {
  .gen-main-wrapper .gen-workspace-grid,
  .gen-main-wrapper .mod-panel {
    height: calc(100vh - 58px - 50px - 22px);
    min-height: 520px;
    padding-top: 0;
    margin-top: 12px;
    box-sizing: border-box;
  }
  .gen-workspace-grid > * { min-height: 0; }
  .gen-controls-card { overflow: hidden; }
  .gen-controls-card .gen-dropzone { flex: 1 1 0; min-height: 84px; height: auto; padding: 12px; }
  .gen-controls-card > *:not(.gen-dropzone) { flex: none; }
  .gen-result-card { min-height: 0; height: 100%; }
  .gen-result-card .gen-preview-canvas-box { min-height: 0; }
}
/* small laptop screens (about 730 px of page): the controls get a little tighter */
@media (min-width: 1101px) and (max-height: 900px) {
  .gen-controls-card { padding: 12px; gap: 8px; }
  .gen-controls-card .bk-open { padding-top: 7px; padding-bottom: 7px; }
  .gen-controls-card .btn-sculpt-toggle { padding: 6px 10px; }
  .gen-controls-card .gen-section-mini-label { margin-bottom: 5px; }
  .gen-controls-card .btn-work-toggle { flex-direction: row; gap: 9px; padding: 8px 10px; }
  .gen-controls-card .btn-work-toggle .work-icon-wrap { width: 30px; height: 30px; }
  .gen-controls-card .btn-mode-toggle { flex-direction: row; align-items: center; gap: 9px; padding: 8px 10px; }
  .gen-controls-card .btn-mode-toggle .mode-top-row { width: auto; flex: none; }
  .gen-controls-card .btn-mode-toggle .mode-icon-box { width: 30px; height: 30px; }
  .gen-controls-card .btn-mode-toggle .mode-desc { font-size: 10.5px; line-height: 1.25; }
  .gen-controls-card .btn-generate-relief { padding: 11px 16px; }
  .gen-controls-card .cnc-cost-line { margin-top: -2px; font-size: 11px; line-height: 1.35; }
  .gen-download-strip-123 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .gen-download-strip-123 .btn-download-card { padding: 7px 12px; }
}

/* ---------------------------------------------------------------- module panels: same 3-column frame as the studio */
.mod-panel {
  display: grid; grid-template-columns: 370px 1fr 380px; gap: 16px;
}
@media (max-width: 1400px) { .mod-panel { grid-template-columns: 350px 1fr 350px; gap: 14px; } }
@media (max-width: 1100px) { .mod-panel { grid-template-columns: 1fr; padding-top: 14px; } }
.mod-card {
  background: var(--paper, #FBF8F2); border: 2px solid var(--line-strong, #C4D2C9); border-radius: var(--radius-xl, 22px);
  box-shadow: 0 8px 24px rgba(22, 32, 30, .08); padding: 14px; box-sizing: border-box; min-height: 0;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.mod-label {
  font: 800 10.5px/1 var(--font-mono, monospace); letter-spacing: .09em; text-transform: uppercase; color: var(--dim, #6B7A73);
  display: flex; align-items: center; justify-content: space-between;
}
.mod-label em { font-style: normal; color: #9C4B30; letter-spacing: .04em; text-transform: none; font-family: var(--font-sans, sans-serif); }

@media (min-width: 1101px) and (max-height: 700px) {
  .gen-controls-card .gen-dropzone .gen-dropzone-icon { display: none; }
}
.mod-tab:not(.active) .mod-tag:not(.new) { opacity: .8; }
@media (max-width: 1440px) { .mod-tab .mod-tag:not(.new) { display: none; } }

/* coming-soon modules */
.soon-card { grid-column: 1 / -1; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.soon-ic { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; color: var(--ic); background: color-mix(in srgb, var(--ic) 12%, #FFFFFF); }
.soon-ic svg { width: 34px; height: 34px; }
.soon-card h2 { margin: 0; font: 600 28px/1.15 var(--font-serif, serif); color: #101716; }
.soon-card p { margin: 0; max-width: 560px; font-size: 14px; line-height: 1.6; color: var(--muted, #5B6B64); }
.soon-pill { font: 800 10px/1 var(--font-mono, monospace); letter-spacing: .1em; padding: 6px 12px; border-radius: 999px; background: #16201E; color: #FFFFFF; }
.soon-outs { display: flex; gap: 8px; }
.soon-outs span { font: 800 11px/1 var(--font-mono, monospace); padding: 7px 10px; border-radius: 9px; border: 2px dashed #C4D2C9; color: #5B6B64; }
#modTrace { --ic: #7A4BB0; } #modLine { --ic: #B0473A; } #modJali { --ic: #2E8A6B; }

@media (max-width: 1100px) {
  .mod-tabs { grid-template-columns: repeat(6, minmax(150px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
}

/* 2026-10-21 21:35 (owner): side icons follow the tool tab */
.gen-sidebar .gen-nav-item[hidden] { display: none !important; }
.mod-card.mod-flash { animation: modFlash 1.1s ease; }
@keyframes modFlash { 0%, 100% { box-shadow: 0 8px 24px rgba(22, 32, 30, .08); } 30% { box-shadow: 0 0 0 4px rgba(47, 111, 176, .45); } }
@media (max-height: 800px) {
  .gen-sidebar { padding-top: 8px !important; padding-bottom: 8px; }
  .gen-sidebar-nav { gap: 2px; }
  .gen-nav-item { height: 48px; }
}

/* 2026-10-21 21:51 (owner: "bahut pechida") -- Convert File, simple: upload left, big Save as buttons right */
.cv-panel { grid-template-columns: 370px 1fr !important; }
@media (max-width: 1400px) { .cv-panel { grid-template-columns: 350px 1fr !important; } }
@media (max-width: 1100px) { .cv-panel { grid-template-columns: 1fr !important; } }
.cv-drop {
  flex: 1 1 0; min-height: 120px; border: 1.5px dashed var(--line-strong, #C4D2C9); border-radius: 16px; background: #FFFFFF;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px;
  padding: 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.cv-drop:hover, .cv-drop.drag-over { border-color: #9C4B30; background: rgba(156, 75, 48, .03); }
.cv-drop-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #FBEFE9; color: #9C4B30; border: 1px solid #EBCFC3; }
.cv-drop-ic svg { width: 20px; height: 20px; }
.cv-drop b { font-size: 14px; color: #101716; }
.cv-drop small { font: 600 10.5px/1.6 var(--font-mono, monospace); color: var(--dim, #6B7A73); }
.cv-file { display: flex; align-items: center; gap: 10px; padding: 10px; border: 2px solid #16201E; border-radius: 14px; background: #FFFFFF; }
.cv-file[hidden] { display: none; }
.cv-file-ext { flex: none; min-width: 52px; height: 40px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  background: #16201E; color: #F2C14E; font: 800 12px/1 var(--font-mono, monospace); }
.cv-file-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cv-file-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-file-txt small { font-size: 11px; color: var(--dim, #6B7A73); }
.cv-file-x { border: 0; background: none; font-size: 20px; color: #9AA8A1; cursor: pointer; }
.cv-keep { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 2px solid #C4D2C9; border-radius: 14px; background: #FFFFFF;
  cursor: pointer; font-weight: 800; font-size: 13.5px; color: #101716; }
.cv-keep[hidden] { display: none; }
.cv-keep input { width: 18px; height: 18px; accent-color: #9C4B30; margin: 0; }
.cv-size { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cv-size[hidden], .cv-size label[hidden] { display: none; }
.cv-size label { display: flex; flex-direction: column; gap: 4px; font: 700 10.5px/1 var(--font-sans, sans-serif); color: #3B4A44; }
.cv-size input { height: 34px; border: 2px solid #C4D2C9; border-radius: 10px; padding: 0 10px; font: 700 13px var(--font-mono, monospace); background: #FFFFFF; color: #101716; min-width: 0; }
.cv-grid { display: grid; grid-template-columns: 34px repeat(6, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.cv-fam { display: grid; place-items: center; font: 800 10px/1 var(--font-mono, monospace); letter-spacing: .08em; color: #9AA8A1; }
.cv-t {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 96px; min-width: 0; padding: 6px;
  border: 2px solid #C4D2C9; border-radius: 16px; background: #FFFFFF; color: #101716; cursor: pointer; font: inherit;
  box-shadow: 0 4px 10px rgba(22, 32, 30, .05); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cv-t b { font: 800 17px/1 var(--font-mono, monospace); color: #9C4B30; }
.cv-t span { font-size: 11.5px; font-weight: 700; color: #3B4A44; text-align: center; line-height: 1.2; }
.cv-t:hover:not(:disabled) { border-color: #9C4B30; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(22, 32, 30, .1); }
.cv-t:disabled { cursor: default; opacity: .35; box-shadow: none; }
.cv-t.mine { opacity: 1; background: #16201E; border-color: #16201E; }
.cv-t.mine b { color: #F2C14E; } .cv-t.mine span { color: #FFFFFF; }
.cv-t.busy { border-color: #9C4B30; background: #FBEFE9; }
.cv-done { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.cv-dl { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 2px solid #DCE4DE; border-radius: 12px; background: #FFFFFF; font-size: 13px; }
.cv-dl b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-dl small { color: var(--dim, #6B7A73); }
.cv-dl a { font-weight: 800; color: #FFFFFF; background: #9C4B30; padding: 7px 12px; border-radius: 9px; text-decoration: none; }
.cv-dl.wait a { background: #C4D2C9; pointer-events: none; }
.cv-drop[hidden] { display: none; }

/* 2026-10-22: Convert File -- Z Equal row + messages */
.cv-zeq small { font-weight: 600; color: var(--dim, #6B7A73); margin-left: 4px; }
.cv-dl.err { border-color: #E3B4A6; background: #FFF6F3; }
.cv-dl.err small { color: #A23B1E; white-space: normal; }
.cv-dl small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }

/* 2026-10-22 15:48 (owner): tool tabs = CNC Premium + Points -- the bar on top of every tool */
.tool-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 10px; border-radius: 11px; background: #F4F0E6;
  border: 1.5px solid #E6DCC6; font: 600 11.5px/1.3 var(--font-sans, sans-serif); color: #3B4A44; }
.tool-bar[hidden] { display: none; }
.tool-bar b { color: #101716; }
.tool-bar .tb-pill { padding: 4px 8px; border-radius: 7px; background: #16201E; color: #F5D77A; font: 800 10px/1 var(--font-mono, monospace); letter-spacing: .04em; }
.tool-bar .tb-sp { flex: 1; }
.tool-bar.lock { background: #FFF6F3; border-color: #E3B4A6; }
.tool-bar .tb-go { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: #9C4B30; color: #FFFFFF; font: 800 11.5px/1 var(--font-sans, sans-serif); cursor: pointer; }
.tool-bar .tb-go:hover { background: #7E3A24; }
.cv-dl:has(.cv-bar) { flex-wrap: wrap; }
.cv-dl .cv-bar { flex: 0 0 100%; order: 9; height: 4px; border-radius: 4px; background: #E6ECE8; overflow: hidden; }
.cv-dl .cv-bar i { display: block; height: 100%; width: 0; background: #2E8A6B; transition: width .3s ease; }


/* Primary Action Buttons */
.jl-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold, #B48448), #8C6230);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.jl-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.jl-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
/* Image to Laser Work -- full height responsive preview cards */
.ls-panel .jl-view {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  height: 100% !important;
  flex: 1 1 0 !important;
}
.ls-styles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
}
.ls-style-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 0;
  min-height: 0;
  height: 100%;
  background: var(--bg-card, #1A2421);
  border: 1.5px solid var(--swatch-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 14px;
  box-sizing: border-box;
}
.ls-style-card .jl-stage {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  position: relative !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  background: #0D1413 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.ls-style-card .jl-stage img {
  position: absolute;
  left: 12px;
  top: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: contain;
}
.ls-style-card .jl-dl {
  flex: 0 0 auto !important;
  margin-top: auto !important;
  padding-top: 6px;
}
@media (max-width: 1100px) {
  .ls-styles-grid {
    grid-template-columns: 1fr;
    height: auto;
  }
  .ls-style-card {
    height: auto;
  }
  .ls-style-card .jl-stage {
    min-height: 380px !important;
  }
}

