/* Shared screen controls: calculator, dialogs and pages using the Omino shell. */
[data-ui-icon="calendar"] { --ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4m10-4v4M3 11h18M7 15h3m4 0h3M7 18h3'/%3E%3C/svg%3E"); }
[data-ui-icon="chart"] { --ui-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18M7 17v-5m5 5V6m5 11V9'/%3E%3C/svg%3E"); }
:root {
    --ui-primary:#0d5b8d;
    --ui-primary-dark:#08476f;
    --ui-line:#d5e0e8;
    --ui-line-strong:#b8cad8;
    --ui-control-h:38px;
    --omino-control-radius:6px;
}
@media screen {
    [hidden] { display:none !important; }
    :is(main, dialog, .configurator-test-settings) :is(input, select, textarea) {
        border-radius:var(--omino-control-radius);
        border-color:var(--ui-line-strong);
        font-family:Arial, Helvetica, sans-serif;
    }
    :is(main, dialog, .configurator-test-settings) :is(select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"])) {
        min-height:38px;
    }
    :is(main, dialog, .configurator-test-settings) :is(fieldset, .config-subsection) {
        border:1px solid var(--ui-line-strong);
        border-radius:var(--omino-control-radius);
    }
    :is(main, dialog, .configurator-test-settings) legend { color:var(--ui-primary); font-weight:700; }
    :is(main, dialog, .configurator-test-settings) :is(button, .btn) {
        min-height:38px;
        border-radius:var(--omino-control-radius);
    }
    :is(main, dialog) :is(.btn.primary, button[type="submit"]) {
        background:var(--ui-primary);
        color:#fff;
    }
    :is(main, dialog) .btn.secondary {
        background:#fff;
        color:var(--ui-primary);
        border:1px solid var(--ui-line-strong);
    }
    :is(button, .btn) > svg { width:20px; height:20px; flex-shrink:0; }
    :is(button, input, select, textarea, a):focus-visible {
        outline:2px solid var(--ui-primary); outline-offset:2px;
    }
}

/* Shared command layer. Legacy calculator selectors are listed explicitly so
   page-local gradients and fixed heights cannot redefine the same command. */
@media screen {
    :root { --ui-control-h:40px; --ui-icon-size:20px; }
    html body .omino-command[data-ui-tone],
    body main.app .btn.omino-command,
    body main.app #workspaceTabs .omino-command,
    body main.app #calculatorLayout .omino-command {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        gap:8px;
        box-sizing:border-box;
        min-height:var(--ui-control-h) !important;
        height:auto !important;
        max-height:none !important;
        padding:9px 14px !important;
        border:1px solid var(--ui-command-border, #0d5b8d) !important;
        border-radius:var(--omino-control-radius) !important;
        background:var(--ui-command-bg, #0d5b8d) !important;
        color:var(--ui-command-fg, #fff) !important;
        font:600 13px/1.4 Arial, Helvetica, sans-serif !important;
        text-decoration:none;
        text-align:center;
        white-space:normal;
        box-shadow:0 1px 2px #16354b14 !important;
        cursor:pointer;
    }
    [data-ui-tone="secondary"] { --ui-command-bg:#f0f6fa; --ui-command-fg:#154e72; --ui-command-border:#b8cad8; }
    [data-ui-tone="success"] { --ui-command-bg:#187556; --ui-command-fg:#fff; --ui-command-border:#146449; }
    [data-ui-tone="danger"] { --ui-command-bg:#b92f39; --ui-command-fg:#fff; --ui-command-border:#a02730; }
    body .omino-command:hover:not(:disabled):not([aria-disabled="true"]) { filter:brightness(.94); }
    body .omino-command:active:not(:disabled) { box-shadow:inset 0 1px 3px #0002 !important; }
    html body .omino-command[data-ui-tone]:disabled,
    body main.app .omino-command:disabled,
    body main.app #calculatorLayout .omino-command:disabled,
    body main.app #workspaceTabs .omino-command:disabled,
    html body .omino-command[data-ui-tone][aria-disabled="true"] {
        background:#e8eef4 !important; color:#657487 !important; border-color:#d5dee7 !important;
        box-shadow:none !important; cursor:not-allowed; filter:none; opacity:1;
    }
    body [data-ui-icon]::before,
    body main.app #workspaceTabs [data-ui-icon]::before,
    body main.app #calculatorLayout [data-ui-icon]::before {
        content:"" !important;
        display:inline-block !important;
        width:var(--ui-icon-size) !important;
        height:var(--ui-icon-size) !important;
        min-width:var(--ui-icon-size);
        flex:0 0 var(--ui-icon-size);
        margin:0 !important;
        background:currentColor;
        -webkit-mask:var(--ui-icon) center / contain no-repeat;
        mask:var(--ui-icon) center / contain no-repeat;
        vertical-align:middle;
        pointer-events:none;
    }
    body :is(button, a.btn) > svg {
        width:var(--ui-icon-size) !important; height:var(--ui-icon-size) !important;
        flex-shrink:0; pointer-events:none;
    }
    body :is(.product-config-tab, .special-q-layer-button, .workspace-tab)[data-ui-icon] {
        align-items:center; justify-content:center; gap:8px; min-height:40px !important;
    }
    body main.app #workspaceTabs .workspace-tab { min-height:40px !important; height:auto !important; border-radius:6px !important; }
    body main.app #workspaceTabs :is(#saveOffer, #previewOffer, #convertOfferToOrder, #newOfferDocumentTab) {
        width:auto !important; max-width:none !important; min-width:84px; padding:9px 14px !important;
    }
    body main.app #workspaceTabs { flex-wrap:wrap; gap:6px !important; }
    body .omino-command[hidden] { display:none !important; }
    @media (pointer:coarse) {
        :root { --ui-control-h:44px; }
    }
}

[data-ui-icon="save"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2021H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h12l4%204v12a2%202%200%200%201-2%202Z%20M7%203v6h10V3%20M7%2021v-8h10v8%22/%3E%3C/svg%3E"); }
[data-ui-icon="document"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8Z%20M14%202v6h6%20M8%2013h8%20M8%2017h6%22/%3E%3C/svg%3E"); }
[data-ui-icon="copy"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%209h12v12H9Z%20M5%2015H3V3h12v2%22/%3E%3C/svg%3E"); }
[data-ui-icon="print"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209V3h12v6%20M6%2018H3V9h18v9h-3%20M6%2014h12v7H6Z%20M17%2011h1%22/%3E%3C/svg%3E"); }
[data-ui-icon="trash"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%206h18%20M9%206V3h6v3%20M5%206l1%2015h12l1-15%20M10%2010v7%20M14%2010v7%22/%3E%3C/svg%3E"); }
[data-ui-icon="mail"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%205h18v14H3Z%20M3%206l9%207%209-7%22/%3E%3C/svg%3E"); }
[data-ui-icon="download"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%203v12%20M7%2010l5%205%205-5%20M3%2016v5h18v-5%22/%3E%3C/svg%3E"); }
[data-ui-icon="upload"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2016V4%20M7%209l5-5%205%205%20M3%2016v5h18v-5%22/%3E%3C/svg%3E"); }
[data-ui-icon="plus"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%205v14%20M5%2012h14%22/%3E%3C/svg%3E"); }
[data-ui-icon="close"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%206l12%2012%20M18%206%206%2018%22/%3E%3C/svg%3E"); }
[data-ui-icon="back"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M19%2012H5%20M11%206l-6%206%206%206%22/%3E%3C/svg%3E"); }
[data-ui-icon="check"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2012l5%205L20%206%22/%3E%3C/svg%3E"); }
[data-ui-icon="refresh"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M20%207a9%209%200%201%200%201%208%20M20%202v6h-6%22/%3E%3C/svg%3E"); }
[data-ui-icon="edit"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m15%204%205%205%20M4%2020l5-1L21%207l-5-5L4%2014Z%22/%3E%3C/svg%3E"); }
[data-ui-icon="search"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2021l-6-6%20M17%2010a7%207%200%201%201-14%200%207%207%200%200%201%2014%200%22/%3E%3C/svg%3E"); }
[data-ui-icon="user"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M16%207a4%204%200%201%201-8%200%204%204%200%200%201%208%200%20M4%2021v-2a8%208%200%200%201%2016%200v2%22/%3E%3C/svg%3E"); }
[data-ui-icon="clock"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200%20M12%207v5l3%202%22/%3E%3C/svg%3E"); }
[data-ui-icon="settings"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%207h16%20M4%2017h16%20M8%204v6%20M16%2014v6%22/%3E%3C/svg%3E"); }
[data-ui-icon="window"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v18H3Z%20M12%203v18%20M3%2012h18%22/%3E%3C/svg%3E"); }
[data-ui-icon="opening"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v18H3Z%20M6%206l12%206-12%206Z%22/%3E%3C/svg%3E"); }
[data-ui-icon="grid"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v18H3Z%20M9%203v18%20M15%203v18%20M3%209h18%20M3%2015h18%22/%3E%3C/svg%3E"); }
[data-ui-icon="align"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%204h18%20M5%208h5v12H5Z%20M14%208h5v8h-5Z%22/%3E%3C/svg%3E"); }
[data-ui-icon="merge"] { --ui-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M3%203h18v18H3Z%20M5%2012h14%20M8%209l3%203-3%203%20M16%209l-3%203%203%203%22/%3E%3C/svg%3E"); }
@media screen {
    html body .omino-command[data-ui-tone][data-ui-compact="true"],
    body main.app #calculatorLayout .omino-command[data-ui-compact="true"] {
        width:36px !important; min-width:36px !important; min-height:36px !important;
        height:36px !important; padding:7px !important; gap:0; font-size:0 !important;
        flex:0 0 36px;
    }
    html body .omino-command[data-ui-tone][data-ui-compact="true"]::before { font-size:0 !important; }
    body :is(.actions, .action-buttons, .row-actions) { gap:6px; }
    html body :is(.home-period-actions, .home-period-toggle, .statistics-period-buttons) {
        height:auto; flex-wrap:wrap; gap:6px;
    }
    html body .home-period-toggle { border:0; background:transparent; }
    html body a.omino-period-choice {
        display:inline-flex; align-items:center; justify-content:center; gap:8px;
        min-height:40px; height:auto; padding:9px 14px; box-sizing:border-box;
        border:1px solid #b8cad8; border-radius:6px !important;
        background:#f0f6fa; color:#154e72;
        font:600 13px/1.4 Arial, Helvetica, sans-serif; text-decoration:none;
    }
    html body a.omino-period-choice.active { background:#0d5b8d; color:#fff; border-color:#0d5b8d; }
    @media (pointer:coarse) {
        html body .omino-command[data-ui-tone][data-ui-compact="true"] { min-width:44px !important; min-height:44px !important; }
    }
}
@media screen {
    body main.app :is(.product-catalog-variant-tab, .product-data-tabs button)[data-ui-icon] {
        display:inline-flex; align-items:center; gap:8px !important;
        min-height:40px !important; height:auto !important;
        padding:8px 12px !important; font-size:12px !important;
    }
    body main.app .product-data-tabs { display:flex; flex-wrap:wrap; gap:6px; }
}
@media screen {
    body main.app #productCatalogVariantTabs button,
    body main.app #productCatalogSizes .product-data-tabs button {
        display:inline-flex !important; align-items:center; gap:8px !important;
        min-height:40px !important; height:auto !important; padding:8px 12px !important;
        border:1px solid var(--ui-line-strong) !important; border-radius:6px !important;
        background:#f0f6fa !important; color:#154e72 !important; font:600 12px/1.4 Arial,sans-serif !important;
    }
    body main.app #productCatalogVariantTabs button[aria-selected="true"],
    body main.app #productCatalogSizes .product-data-tabs button[aria-selected="true"] {
        background:#0d5b8d !important; color:#fff !important; border-color:#0d5b8d !important;
    }
}
