/* Klienta rīka izkārtojums "modern": kapsulu pogas (Design/Preview, Add design, Upload image, Add text, Background colour), krāsu apļi pie 3D skata,
   kompaktas slāņa kartītes. DATORĀ (>768px) slāņu rīki ir labajā panelī (530px) kā classic izkārtojumā; šaurā ekrānā (telefons) -
   3D skatuve augšā un apakšējais panelis, kura augstums pielāgojas saturam. Visas funkcijas ir tās pašas kā classic - mainīts tikai izvietojums.
   Ieslēdz: konsole -> Iestatījumi -> 3D rīks (app_settings.tool_layout = modern) vai pārbaudei ?layout=modern.
   Krāsas tikai caur --brand-* mainīgajiem (brand/<zīmols>/theme.css). */
html.tool-layout-modern{
    --tl-panel-h: clamp(300px, 44vh, 460px);
    --tl-line: #E1E5EA;
    --tl-ink: var(--brand-ink, #15191E);
    --tl-accent: var(--brand-accent, #9A2F58);
}

/* ---- skatuve ---- */
html.tool-layout-modern .wrap-content.worksheet-content{top:0;bottom:0;}
html.tool-layout-modern body:not(.admin) .design-side,
html.tool-layout-modern body:not(.admin).tools-collapsed .design-side{
    left: 0;
    right: 0;
    top: 56px;
    bottom: var(--tl-panel-h);
    height: auto;
}

/* ---- Design / Preview: kapsulas virs skatuves centra ---- */
html.tool-layout-modern body:not(.admin) .header-wrap.header-wrap-worksheet{
    left: 0;
    right: 0;
    width: auto;
    top: 14px;
    height: auto;
    background: transparent;
    pointer-events: none;
    z-index: 12;
}
html.tool-layout-modern .header-wrap.header-wrap-worksheet .header{height:auto;padding:0;overflow:visible;}
html.tool-layout-modern .header-worksheet-tools-block{height:auto;}
html.tool-layout-modern .header-worksheet-tools{justify-content:center;gap:8px;}
html.tool-layout-modern .header-worksheet-tools .header-worksheet-tools-cotainer{margin:0;}
html.tool-layout-modern .header-worksheet-tools .btn{
    pointer-events: auto;
    height: 40px;
    padding: 0 22px;
    border-radius: 10px;
    font-weight: 600;
    background: #fff;
    color: var(--tl-ink);
    border: 1px solid var(--tl-line);
    box-shadow: 0 1px 2px rgba(20,30,50,.06);
}
html.tool-layout-modern .header-worksheet-tools .btn.btn-active{background:var(--tl-ink);color:#fff;border-color:var(--tl-ink);}

/* ---- apakšējais panelis ---- */
html.tool-layout-modern body:not(.admin) .navigation-content.navigation-worksheet-tools,
html.tool-layout-modern body:not(.admin) .navigation-content.navigation-worksheet-tools.collapsed{
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    max-width: none;
    height: var(--tl-panel-h);
    border-left: 0;
    border-top: 1px solid var(--tl-line);
    background: #fff;
    z-index: 4;
}
html.tool-layout-modern body:not(.admin) .navigation-worksheet-tools-switch{display:none;}
html.tool-layout-modern .design-objects,
html.tool-layout-modern .design-objects-content{height:100%;display:flex;flex-direction:column;min-height:0;}
html.tool-layout-modern .design-objects-content > div:last-child{min-height:0;flex:1;display:flex;flex-direction:column;}
html.tool-layout-modern .tabs-stage{flex:1;min-height:0;overflow-y:auto;padding:0 20px 16px;box-sizing:border-box;}

/* augšējā josla: pogas + puses izvēle + Next vienā rindā, saturs ritinās zem tās */
html.tool-layout-modern .design-next-step{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 20px 6px;
    box-sizing: border-box;
}
html.tool-layout-modern .design-next-step .design-name{flex:0 1 220px;min-width:140px;}
html.tool-layout-modern .design-next-step > .btn{flex:0 0 auto;}
html.tool-layout-modern .tl-actions{display:flex;flex-wrap:wrap;gap:8px;margin-right:auto;}
html.tool-layout-modern .tl-act{
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid var(--tl-line);
    background: #fff;
    color: var(--tl-ink);
    font: 600 14px/1 var(--brand-font, inherit);
    cursor: pointer;
}
html.tool-layout-modern .tl-add-label{align-self:center;font:600 14px/1 var(--brand-font, inherit);color:#5B6675;margin-right:2px;}   /* "Add" pirms pogām Image / Text / Text art / Background colour */
html.tool-layout-modern .tl-act:hover{border-color:var(--tl-ink);}
html.tool-layout-modern .tl-act-primary{background:var(--tl-ink);border-color:var(--tl-ink);color:#fff;}
html.tool-layout-modern .tl-act-primary:hover{opacity:.9;}
html.tool-layout-modern .tl-hint{flex:0 0 100%;order:4;margin:0;font-size:12.5px;color:#7a8594;}
html.tool-layout-modern .tl-actions{order:1;}
html.tool-layout-modern .design-next-step .design-name{order:2;}
html.tool-layout-modern .design-next-step > .btn{order:3;}
/* cilnes: vienkāršas */
html.tool-layout-modern .tabs-nav{padding:0 20px;}

/* classic "Add design" kartītes bloks modern izkārtojumā vairs nav vajadzīgs (to aizstāj pogu rinda); opcijas paliek DOM, lai strādā tie paši apstrādātāji */
html.tool-layout-modern .add-design-opener,
html.tool-layout-modern .add-design-form{display:none !important;}

/* ielādes aizsegs un kājene */
@media (max-width: 768px){ html.tool-layout-modern .design-loading{flex-direction:column;} }
html.tool-layout-modern body:not(.admin) .footer-worksheet{
    left: 0;
    right: 0;
    width: auto;
    bottom: var(--tl-panel-h);
    height: 44px;
    background: transparent;
    z-index: 12;
}

@media (max-width: 768px){
    html.tool-layout-modern{--tl-panel-h: clamp(260px, 46vh, 420px);}
    /* šaurā ekrānā: pogas vienā ritināmā rindā, sīkais teksts paslēpts, lai viss ietilpst */
    html.tool-layout-modern .design-next-step{padding:10px 14px 4px;gap:8px;}
    html.tool-layout-modern .tl-actions{flex:0 0 100%;flex-wrap:nowrap;overflow-x:auto;margin:0;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
    html.tool-layout-modern .tl-actions::-webkit-scrollbar{display:none;}
    html.tool-layout-modern .tl-act{flex:0 0 auto;padding:0 14px;height:36px;font-size:13px;}
    html.tool-layout-modern .tl-hint{display:none;}
    html.tool-layout-modern .design-next-step .design-name{flex:1 1 auto;}
    html.tool-layout-modern .tabs-nav{padding:0 14px;}
    html.tool-layout-modern .tabs-stage{padding:0 14px 12px;}
    /* krāsu apļi: vertikāli, skatuves kreisajā malā (kā datorā); skatuve = no 56px (zem Design/Preview vietas) līdz paneļa augšai */
    html.tool-layout-modern .tl-swatches{top:calc(56px + (100vh - 56px - var(--tl-panel-h)) / 2);left:8px;padding:8px;gap:8px;}
    html.tool-layout-modern .tl-swatch{width:24px;height:24px;}
}

/* krāsu apļi: vertikāli, skatuves kreisajā malā (skatuve = no 56px līdz paneļa augšai) */
@media (min-width: 769px){
    html.tool-layout-modern .tl-swatches{top:calc(56px + (100vh - 56px - var(--tl-panel-h)) / 2);}
}

/* ======================================================================
   SLĀŅA DETAĻAS (Layers cilne): kompaktas kartītes, mazi virsraksti, lai teksta/attēla slāņa opcijas ietilpst bez ritināšanas.
   Visi lauki un apstrādātāji ir tie paši (templates/3d/layer_options_*.htm.inc) - mainīts tikai izskats.
   ====================================================================== */
html.tool-layout-modern .layer-options{
    border: 1px solid var(--tl-line);
    border-radius: 14px;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20,30,50,.05);
}
html.tool-layout-modern .layer-option-section{border-top: 1px solid #EEF1F5;}
/* slāņa galvene: ikona + nosaukums + kopēt/dzēst vienā šaurā rindā */
html.tool-layout-modern .layer-options .add-design.layer-source{padding: 8px 12px;min-height: 0;}
html.tool-layout-modern .layer-options .add-design .add-design-icon{width: 32px;flex: 0 0 32px;}
html.tool-layout-modern .layer-options .add-design .add-design-icon svg,
html.tool-layout-modern .layer-options .add-design .add-design-icon img{width: 32px;height: 32px;}
html.tool-layout-modern .layer-options .add-design .add-design-info{padding-left: 10px;}
html.tool-layout-modern .layer-options .add-design .leyer-options-btn button{padding: 0;line-height: 0;}
html.tool-layout-modern .layer-options .add-design .leyer-options-btn svg{width: 30px;height: 30px;}
/* sadaļu virsraksti (Transform / Position / Cutline / Pattern / Filter ...): visi vienāda augstuma, fonta un krāsas */
html.tool-layout-modern .layer-heading,
html.tool-layout-modern .layer-heading.has-switch{
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--tl-ink);
}
html.tool-layout-modern .layer-options-content{padding: 4px 14px 12px;}
html.tool-layout-modern .layer-options-content.has-col{gap: 12px;}
html.tool-layout-modern .layer-options-content .layer-options-col{font-size: 12px;color: #5d6877;}
/* teksta ievade */
html.tool-layout-modern .layer-options-content.has-rows .customTextInput{border-radius: 10px;border-color: var(--tl-line);}
html.tool-layout-modern .layer-options-content.has-rows .customTextInput textarea,
html.tool-layout-modern .layer-options-content.has-rows .customTextInput input{height: 52px;padding: 8px 12px;font-size: 15px;box-sizing: border-box;}
/* fontu saraksts */
html.tool-layout-modern .layer-custem-text-options .customFontBox{padding: 4px 0 0;font-size: 12px;font-weight: 600;color: #5d6877;}
html.tool-layout-modern .layer-custem-text-options .customFontBox .customFontBoxItems{margin: 6px 0 4px;max-height: none;overflow: visible;border: 0;}
html.tool-layout-modern .layer-custem-text-options .customFontBox .customFontBoxItem{margin: 0;padding: 9px 8px 9px 34px;font-size: 16px;line-height: 22px;}
html.tool-layout-modern .layer-custem-text-options .customFontBox input[type="text"]{
    width: 100%;height: 30px;box-sizing: border-box;border: 1px solid var(--tl-line);border-radius: 8px;padding: 0 10px;font-size: 13px;color: var(--tl-ink);background: #F7F9FB;
}
/* skaitļu lauki ar + / - */
html.tool-layout-modern .layer-option-input .layer-option-input-value{height: 34px;border-color: var(--tl-line);border-radius: 8px;margin: 0 4px;}
html.tool-layout-modern .layer-option-input .layer-option-input-value input{font-size: 15px;line-height: 18px;border: 0;background: none;}
html.tool-layout-modern .layer-option-input .plus,
html.tool-layout-modern .layer-option-input .minus{flex: 0 0 34px;height: 34px;border-radius: 8px;}
/* krāsa */
html.tool-layout-modern .layer-color-options > div{width: 26px;height: 26px;padding: 0;margin: 3px;border-color: #cfd6df;border-radius: 50%;}
html.tool-layout-modern .layer-color-picker{padding: 8px 0 0;font-size: 12px;color: #5d6877;}
html.tool-layout-modern .layer-color-picker-input,
html.tool-layout-modern .layer-color-picker-input input{height: 34px;border-radius: 8px;}
html.tool-layout-modern .layer-color-picker-input{border-color: var(--tl-line);}

@media (max-width: 768px){
    html.tool-layout-modern .layer-options{margin-top: 6px;border-radius: 12px;}
    html.tool-layout-modern .layer-options .add-design.layer-source{padding: 6px 10px;}
    html.tool-layout-modern .layer-heading,
    html.tool-layout-modern .layer-heading.has-switch{padding: 0 12px;min-height: 38px;}
    html.tool-layout-modern .layer-options-content{padding: 2px 12px 8px;}
    html.tool-layout-modern .layer-options-content.has-rows .customTextInput textarea,
    html.tool-layout-modern .layer-options-content.has-rows .customTextInput input{height: 44px;padding: 6px 10px;}
    html.tool-layout-modern .layer-custem-text-options .customFontBox{padding-top: 2px;}
    html.tool-layout-modern .layer-custem-text-options .customFontBox .customFontBoxItems{max-height: none;}
    html.tool-layout-modern .layer-custem-text-options .customFontBox .customFontBoxItem{margin: 0;padding: 8px 8px 8px 34px;font-size: 15px;line-height: 20px;}
    html.tool-layout-modern .layer-option-input .layer-option-input-value{height: 32px;}
    html.tool-layout-modern .layer-option-input .plus,
    html.tool-layout-modern .layer-option-input .minus{flex: 0 0 32px;height: 32px;}
}

/* akordeona bultiņa uz sadaļu virsrakstiem (šaurā ekrānā tie atver / aizver sadaļu) */
@media (max-width: 768px){
    html.tool-layout-modern .tab-content{padding-left: 0;padding-right: 0;}
}

html.tool-layout-modern .tab-content{padding-left: 0;padding-right: 0;}

/* tukšie rezerves augstumi (tab-content polsteris, slēptās fails formas) nedrīkst palielināt paneli */
html.tool-layout-modern .tab-content{padding-top: 0;padding-bottom: 0;}
html.tool-layout-modern .tabs-stage > div > form{height: 0;margin: 0;overflow: hidden;line-height: 0;}

/* ======================================================================
   DATORS (>768px): slāņu rīki labajā panelī, skatuve pa kreisi - kā classic, bet ar modern pogām un kartītēm
   ====================================================================== */
@media (min-width: 769px){
    html.tool-layout-modern body:not(.admin) .design-side,
    html.tool-layout-modern body:not(.admin).tools-collapsed .design-side{
        right: 530px;
        bottom: 0;
    }
    html.tool-layout-modern body:not(.admin) .header-wrap.header-wrap-worksheet{right: 530px;}
    html.tool-layout-modern body:not(.admin) .footer-worksheet{right: 530px;bottom: 0;}
    html.tool-layout-modern body:not(.admin) .navigation-content.navigation-worksheet-tools,
    html.tool-layout-modern body:not(.admin) .navigation-content.navigation-worksheet-tools.collapsed{
        left: auto;
        right: 0;
        top: 0;
        bottom: 0;
        width: 530px;
        max-width: 530px;
        height: auto;
        border-top: 0;
        border-left: 1px solid var(--tl-line);
    }
    html.tool-layout-modern .tl-swatches{top: calc(56px + (100vh - 56px) / 2);}
}

@media (min-width: 769px){
    html.tool-layout-modern .tl-actions{gap: 6px;}
    html.tool-layout-modern .tl-act{padding: 0 12px;height: 38px;font-size: 13.5px;}
    html.tool-layout-modern .design-next-step{padding: 14px 16px 6px;}
    html.tool-layout-modern .tabs-nav{padding: 0 16px;}
    html.tool-layout-modern .tabs-stage{padding: 0 16px 16px;}
}

/* Classic loģika pārslēdz .show-add-design-form, kas paslēpj slāņus; modern izkārtojumā "Add design" formas nav, tāpēc slāņiem jābūt redzamiem vienmēr
   (citādi pirmais pievienotais slānis neparādās, bet pēc otrā parādās abi) */
html.tool-layout-modern .tab-content.show-add-design-form .layer-options{display: block;}

/* ---- Cilnes (Layers / My Library / Presets): segmentēta kapsula ar baltu aktīvo pogu; atstarpe virs un zem ---- */
html.tool-layout-modern .tl-hint{margin-bottom:6px;}
html.tool-layout-modern .left-navigation ul.tabs-nav{
    margin: 14px 16px 14px;
    padding: 4px;
    gap: 4px;
    background: #eef1f5;
    border-radius: 12px;
    box-sizing: border-box;
    width: auto;
}
html.tool-layout-modern .left-navigation ul.tabs-nav li{flex: 1 1 0;min-width: 0;}
html.tool-layout-modern .left-navigation ul.tabs-nav li a{
    width: 100%;
    height: 36px;
    border-radius: 9px;
    border: 0;
    color: #5b6675;
    font-size: 13.5px;
    font-weight: 600;
    transition: background .15s, color .15s, box-shadow .15s;
}
html.tool-layout-modern .left-navigation ul.tabs-nav li a:hover{color: var(--tl-ink, #15191E);}
html.tool-layout-modern .left-navigation ul.tabs-nav li.tab-active a{
    background: #fff;
    color: var(--tl-ink, #15191E);
    border: 0;
    box-shadow: 0 1px 3px rgba(20,30,50,.16), 0 0 0 1px rgba(20,30,50,.04);
}
/* apakšcilnes (Uploads / Pexels results): mazi kontūra pill */
html.tool-layout-modern .left-navigation .tabs-stage ul.tabs-library{padding: 2px 0 12px;gap: 6px;}
html.tool-layout-modern .left-navigation ul.tabs-library li a{
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--tl-line, #dfe4ea);
    font-size: 12.5px;
    color: #5b6675;
}
/* abas cilnes vienāda platuma pa visu rindu (skaidrāk: "Mani faili" / "Meklēt foto") */
html.tool-layout-modern .left-navigation ul.tabs-library li{flex: 1 1 0;}
html.tool-layout-modern .left-navigation ul.tabs-library li a{width: 100%;box-sizing: border-box;justify-content: center;text-align: center;}
html.tool-layout-modern .left-navigation ul.tabs-library li.tab-active a,
html.tool-layout-modern .left-navigation ul.tabs-library:not(:has(li.tab-active)) li:first-child a{
    background: var(--tl-ink, #15191E);
    border-color: var(--tl-ink, #15191E);
    color: #fff;
}
/* My Library: abi pievienošanas bloki kompaktāki */
html.tool-layout-modern .my-library-content{gap: 8px;}
html.tool-layout-modern .my-library-content .add-design{padding: 8px 12px;border-radius: 10px;}
html.tool-layout-modern .my-library-content .add-design .add-design-info{padding-left: 8px;}
html.tool-layout-modern .my-library-content .search-input{margin-top: 4px;gap: 6px;}
html.tool-layout-modern .my-library-content .search-input input{padding: 3px 8px;height: 28px;box-sizing: border-box;border-radius: 6px;}
html.tool-layout-modern .my-library-content .search-input .btn{padding: 0 10px;height: 28px;border-radius: 6px;}
html.tool-layout-modern .mobile-view .my-library-content{gap: 8px;}
html.tool-layout-modern .mobile-view .my-library-content .add-design{padding: 8px 12px;}
@media (max-width: 768px){
    html.tool-layout-modern .left-navigation ul.tabs-nav{margin: 8px 14px 10px;}
    html.tool-layout-modern .left-navigation ul.tabs-nav li a{height: 34px;}
}

/* Design/Preview kapsulu vairs nav (3D poga stūrī vai tikai 3D): skatuve sākas pašā augšā, nevis 56px zemāk; krāsu apļi pa skatuves vidu */
html.tool-layout-modern body.tool-3d-button:not(.admin) .design-side,
html.tool-layout-modern body.full-surface:not(.admin) .design-side{top:0;}
html.tool-layout-modern body.tool-3d-button .tl-swatches,
html.tool-layout-modern body.full-surface .tl-swatches{top:calc((100vh - var(--tl-panel-h)) / 2);}
@media (min-width: 769px){
    html.tool-layout-modern body.tool-3d-button .tl-swatches,
    html.tool-layout-modern body.full-surface .tl-swatches{top:50%;}
}

/* Apakšējā josla (atpakaļ / uz priekšu / Reset / tuvināt / tālināt) kompaktāka */
html.tool-layout-modern .footer-pages-navigation{gap:6px;padding-left:10px;flex-wrap:nowrap;}
html.tool-layout-modern .footer-pages-tools{flex:0 0 auto;padding:0 10px 0 0;gap:6px;}
html.tool-layout-modern .footer-worksheet .undo svg,
html.tool-layout-modern .footer-worksheet .redo svg,
html.tool-layout-modern .footer-worksheet .zoom-in svg,
html.tool-layout-modern .footer-worksheet .zoom-out svg{width:26px;height:26px;}
html.tool-layout-modern .footer-worksheet .reset svg{width:26px;height:26px;}
html.tool-layout-modern .footer-worksheet .reset{display:flex;align-items:center;background:#fff;border-radius:3px;}
html.tool-layout-modern .footer-worksheet .reset-label{padding:0 10px 0 0;margin:0;height:26px;line-height:26px;background:none;border-radius:0;font:600 12px/26px var(--brand-font, inherit);color:var(--tl-ink);}
/* krāsu apļi virs 2D audekla (design-wrapper z-index 12), lai tos var spiest arī 2D skatā */
html.tool-layout-modern .tl-swatches{z-index:14;}

/* Datorā: augšējā rindā puses izvēle + Next, zem tās pogas Add image / Add text / Background colour */
@media (min-width: 769px){
    html.tool-layout-modern .tl-actions{display:contents;}
    html.tool-layout-modern .design-next-step .design-name{order:1;flex:1 1 auto;min-width:200px;}
    html.tool-layout-modern .design-next-step > .btn{order:2;margin-left:0;}
    html.tool-layout-modern .design-next-step::after{content:"";order:3;flex:0 0 100%;height:0;margin-top:-10px;}   /* rindas pārlauzums */
    html.tool-layout-modern .tl-add-label{order:4;}
    html.tool-layout-modern .tl-act[data-tl="upload"]{order:4;}
    html.tool-layout-modern .tl-act[data-tl="text"],
    html.tool-layout-modern .tl-act[data-tl="textart"]{order:5;}
    html.tool-layout-modern .tl-act[data-tl="background"]{order:6;margin-right:auto;}
    html.tool-layout-modern .tl-hint{order:7;}
}

/* akordeona bultiņa uz sadaļu virsrakstiem (visos platumos): virsraksts atver / aizver sadaļu */
html.tool-layout-modern .layer-heading:not(.has-switch)::after{
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-left: 8px;
    border-right: 2px solid #7a8594;
    border-bottom: 2px solid #7a8594;
    transform: rotate(-135deg) translate(-2px, -2px);
    transition: transform .2s;
}
html.tool-layout-modern .layer-option-section.collapsed > .layer-heading::after{transform: rotate(45deg);}

html.tool-layout-modern .design-next-step > .side-thumbs{order:1;}
@media (min-width: 769px){
    html.tool-layout-modern .design-next-step > .side-thumbs{order:1;}
}
@media (max-width: 768px){
    html.tool-layout-modern .side-thumb,html.tool-layout-modern .side-thumb-img{width:56px;}
    html.tool-layout-modern .side-thumb-img{height:56px;}
}

/* ---- Atpakaļ / uz priekšu / Reset / tuvināt / tālināt: vertikāla kolonna skatuves labajā pusē, zem "3D" pogas (nevis apakšā) ---- */
html.tool-layout-modern body:not(.admin) .footer-worksheet{
    left: auto;
    right: 10px;
    top: 114px;           /* skatuve sākas no 56px + 10px + 3D poga 38px + 10px */
    bottom: auto;
    width: auto;
    height: auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 12;
}
html.tool-layout-modern body:not(.admin) .footer-pages-navigation,
html.tool-layout-modern body:not(.admin) .footer-pages-tools{
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 8px;
    padding: 0;
}
html.tool-layout-modern body:not(.admin) .footer-worksheet .undo,
html.tool-layout-modern body:not(.admin) .footer-worksheet .redo,
html.tool-layout-modern body:not(.admin) .footer-worksheet .reset,
html.tool-layout-modern body:not(.admin) .footer-worksheet .zoom-in,
html.tool-layout-modern body:not(.admin) .footer-worksheet .zoom-out{
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(20,30,50,.16);
    background: #fff;
    overflow: hidden;
}
@media (min-width: 769px){
    html.tool-layout-modern body:not(.admin) .footer-worksheet{right: 540px;bottom: auto;}
}
/* Kolonnā Reset - tikai ikona (teksts pārklāj pogu) */
html.tool-layout-modern body:not(.admin) .footer-worksheet .reset-label{display:none;}

/* ---- "Design Review" (Next): skats panelī ar kontrolsarakstu un Download / Add to cart pogām ----
   Iepriekš modern izkārtojumā kaste parādījās zem paneļa satura (ārpus ekrāna) - Next šķita nedarām neko. */
html.tool-layout-modern body.save-action .design-objects{display:none !important;}
html.tool-layout-modern body:not(.admin).save-action .navigation-content.navigation-worksheet-tools,
html.tool-layout-modern body:not(.admin).save-action .navigation-content.navigation-worksheet-tools.collapsed{overflow-y:auto;}
@media (max-width: 768px){
    html.tool-layout-modern body:not(.admin).save-action .navigation-content.navigation-worksheet-tools,
    html.tool-layout-modern body:not(.admin).save-action .navigation-content.navigation-worksheet-tools.collapsed{top:56px;height:auto;}
}
html.tool-layout-modern .save-action-box{min-height:100%;box-sizing:border-box;background:#fff;}
html.tool-layout-modern .close-save-action{padding:18px 22px 6px;}
html.tool-layout-modern .close-save-action .close-title{font:700 16px/22px var(--brand-font, inherit);color:#5B6675;}
html.tool-layout-modern .close-save-action .close-btn svg{width:34px;height:34px;}
html.tool-layout-modern .save-action-content{border-top:0;padding:4px 22px 30px;}
html.tool-layout-modern .save-action-header{font:400 15px/22px var(--brand-font, inherit);color:#5B6675;}
html.tool-layout-modern .save-action-header h1{margin:6px 0 4px;font:700 26px/32px var(--brand-font, inherit);color:#15191E;}
html.tool-layout-modern .save-action-content ul{padding:16px 0 8px;margin:16px 0 18px;border-top:1px solid #EEF0F3;list-style:none;}
html.tool-layout-modern .save-action-content ul li{padding-bottom:12px;font:600 14px/20px var(--brand-font, inherit);color:#15191E;}
html.tool-layout-modern .save-action-content ul li svg path{fill:var(--brand-accent, #9A2F58);}
html.tool-layout-modern .save-action-content .btn{height:46px;border-radius:12px;justify-content:center;gap:8px;font:700 15px/1 var(--brand-font, inherit);border:1px solid transparent;box-shadow:0 1px 2px rgba(20,30,50,.14);}
html.tool-layout-modern .save-action-content .btn[id^="design-download"]{background:#fff;color:#15191E;border-color:#DCE1E8;box-shadow:none;}
html.tool-layout-modern .save-action-content .btn[id^="design-download"]:hover{border-color:#15191E;}
@media (max-width: 768px){
    /* telefonā Design Review aizņem visu - krāsu apļi un rīku kolonna to nepārklāj */
    html.tool-layout-modern body.save-action .tl-swatches,
    html.tool-layout-modern body.save-action .footer-worksheet{display:none;}
}

/* Telefons, 3D produkti: pogu savstarpējais novietojums - kreisā mala (krāsu apļu kapsula + Full view) un labā kolonna (atpakaļ / uz priekšu / Reset / tuvināt) uz vienas vertikālās līnijas
   ar augšējās rindas pogām; kolonna sākas 10px zem augšējās rindas (38px pogas, top 10px) */
@media (max-width: 768px){
    html.tool-layout-modern body.tool-3d-button:not(.admin):not(.save-action) .footer-worksheet,
    html.tool-layout-modern body.full-surface:not(.admin):not(.save-action) .footer-worksheet{right:16px;top:58px;}
}

/* Telefons, 3D produkts, "Design Review" (Next): panelis ir apakšējā loksne, 3D modelis paliek redzams virs tās; ar "Full view" ikonu loksni paslēpj un modeli redz visu ekrānu */
@media (max-width: 768px){
    html.tool-layout-modern body.view-3d.save-action:not(.full-view):not(.admin){--tl-panel-h:min(430px, 60vh);}
    html.tool-layout-modern body.view-3d.save-action:not(.admin) .navigation-content.navigation-worksheet-tools,
    html.tool-layout-modern body.view-3d.save-action:not(.admin) .navigation-content.navigation-worksheet-tools.collapsed{top:auto;height:var(--tl-panel-h);}
    html.tool-layout-modern body.view-3d.save-action:not(.admin) .close-save-action{padding:12px 20px 0;}
    html.tool-layout-modern body.view-3d.save-action:not(.admin) .save-action-header h1{font-size:22px;line-height:28px;}
}
