/* Schildereinkauf-Konfigurator – Editor-Styles (Phase 1)
   Streng gekapselt: alle Klassen mit sekk-Präfix, keine generischen Selektoren. */

/* ---------- Artikelseite: Button-Box ---------- */
.sekk-product-box {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.4;
}
.sekk-product-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sekk-size-label {
    color: #555;
    font-weight: 600;
}
.sekk-note {
    margin-top: 6px;
    color: #666;
    font-size: 13px;
}
.sekk-note:empty {
    display: none;
}
.sekk-note-warn {
    color: #b71c1c;
}
.sekk-thumb-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.sekk-thumb-wrap:empty {
    display: none;
}
.sekk-thumb {
    max-width: 140px;
    max-height: 90px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
}
.sekk-thumb-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.sekk-thumb-ok {
    color: #2e7d32;
    font-weight: 600;
    font-size: 13px;
}
.sekk-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #1565c0;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
}
.sekk-link-muted {
    color: #888;
}

/* ---------- Optionen (Randlos / Vorstufe) ---------- */
.sekk-options {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sekk-option-wrap {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 8px 10px;
    background: #fff;
}
.sekk-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    font-weight: 600;
}
.sekk-option-cb {
    margin-top: 2px;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}
.sekk-option-desc {
    margin: 6px 0 0 25px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

/* ---------- Buttons (generisch im Plugin-Scope) ---------- */
.sekk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #bbb;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}
.sekk-btn:hover:not(:disabled) {
    background: #f0f0f0;
}
.sekk-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.sekk-btn-primary {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
    font-weight: 600;
}
.sekk-btn-primary:hover:not(:disabled) {
    background: #0d4fa0;
}
.sekk-btn-ghost {
    background: transparent;
    border-color: #999;
}
.sekk-btn-block {
    width: 100%;
    margin-top: 8px;
}

/* ---------- Editor-Overlay ---------- */
.sekk-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    background: #e8eaed;
    color: #222;
    font-family: inherit;
    font-size: 14px;
}
.sekk-no-scroll {
    overflow: hidden !important;
}
.sekk-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid #d0d0d0;
    flex-wrap: wrap;
}
.sekk-title {
    font-weight: 700;
    white-space: nowrap;
}
.sekk-tools {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}
.sekk-tool {
    padding: 6px 10px;
    font-size: 13px;
}
/* Primäre Element-Werkzeuge (Text/Rechteck/Kreis/Dreieck) hervorheben,
   damit sofort klar ist, was man tun kann. */
.sekk-tool-main {
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 600;
    border-color: #1565c0;
    color: #0d4fa0;
}
.sekk-tool-main:hover:not(:disabled) {
    background: #e8f0fb;
}
.sekk-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.sekk-main {
    display: flex;
    flex: 1;
    min-height: 0;
}
.sekk-canvas-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 16px;
    background:
        linear-gradient(45deg, #dcdcdc 25%, transparent 25%, transparent 75%, #dcdcdc 75%),
        linear-gradient(45deg, #dcdcdc 25%, transparent 25%, transparent 75%, #dcdcdc 75%);
    background-size: 24px 24px;
    background-position: 0 0, 12px 12px;
    background-color: #ececec;
}
.sekk-canvas-wrap .canvas-container {
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}
.sekk-overlay-canvas {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 20;
}
.sekk-panel {
    width: 290px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #d0d0d0;
    padding: 14px;
    overflow-y: auto;
}
.sekk-panel-hint {
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
}
.sekk-row {
    display: block;
    margin-bottom: 12px;
}
.sekk-row-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}
.sekk-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background: #fff;
    color: #222;
    font-size: 14px;
}
.sekk-row-toggles {
    display: flex;
    gap: 6px;
}
.sekk-toggle {
    min-width: 38px;
    padding: 6px 8px;
}
.sekk-toggle-on {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
}
.sekk-bold {
    font-weight: 700;
}
.sekk-italic {
    font-style: italic;
}
.sekk-underline {
    text-decoration: underline;
}
.sekk-swatches {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}
.sekk-swatch {
    width: 22px;
    height: 22px;
    border: 1px solid #999;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}
.sekk-swatch-active {
    outline: 2px solid #1565c0;
    outline-offset: 1px;
}
.sekk-color-input {
    width: 30px;
    height: 26px;
    padding: 0;
    border: 1px solid #999;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.sekk-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e2e2e2;
}
.sekk-icon-btn {
    padding: 8px 0;
    font-size: 16px;
}
.sekk-footer {
    background: #fff;
    border-top: 1px solid #d0d0d0;
    padding: 6px 14px;
}
.sekk-warn {
    color: #b71c1c;
    font-weight: 600;
    font-size: 13px;
    padding: 4px 0;
}
.sekk-hints {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #777;
    font-size: 12px;
}

/* ---------- Vorschau-Modal ---------- */
.sekk-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 100010;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sekk-preview-inner {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.sekk-preview-title {
    font-weight: 700;
    font-size: 16px;
}
.sekk-preview-img {
    max-width: 100%;
    max-height: calc(92vh - 130px);
    border: 1px solid #ddd;
    background: #fff;
}

/* ---------- DPI-Anzeige (Logo) ---------- */
.sekk-dpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 5px;
    margin-bottom: 8px;
}
.sekk-dpi-optimal,
.sekk-dpi-good {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
}
.sekk-dpi-acceptable {
    background: #fff8e1;
    border: 1px solid #ffe082;
}
.sekk-dpi-low {
    background: #fdecea;
    border: 1px solid #f5b1aa;
}
.sekk-dpi-value {
    font-weight: 700;
}
.sekk-dpi-state {
    font-size: 12px;
}
.sekk-dpi-optimal .sekk-dpi-state,
.sekk-dpi-good .sekk-dpi-state {
    color: #2e7d32;
}
.sekk-dpi-acceptable .sekk-dpi-state {
    color: #a06b00;
}
.sekk-dpi-low .sekk-dpi-state {
    color: #b71c1c;
}
.sekk-dpi-hint {
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}

/* ---------- Emoji-/Symbol-Picker ---------- */
.sekk-emoji-inner {
    align-items: stretch;
    width: min(92vw, 720px);
}
.sekk-emoji-grid {
    overflow-y: auto;
    max-height: calc(92vh - 150px);
    padding-right: 4px;
}
.sekk-emoji-cat {
    font-weight: 700;
    font-size: 13px;
    color: #555;
    margin: 12px 0 6px;
}
.sekk-emoji-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
}
.sekk-emoji-btn {
    aspect-ratio: 1 / 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sekk-emoji-btn:hover {
    border-color: #1565c0;
    background: #e8f0fb;
}
.sekk-emoji-btn img {
    max-width: 100%;
    max-height: 100%;
}

/* ---------- Warenkorb ---------- */
.sekk-cart-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.sekk-cart-preview-img {
    max-width: 90px;
    max-height: 60px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
}
.sekk-cart-preview-label {
    font-size: 12px;
    color: #555;
}

/* ---------- Mobil ---------- */
@media (max-width: 820px) {
    .sekk-main {
        flex-direction: column;
    }
    .sekk-panel {
        width: auto;
        max-height: 42vh;
        border-left: none;
        border-top: 1px solid #d0d0d0;
        order: 2;
    }
    .sekk-canvas-wrap {
        order: 1;
        padding: 10px;
    }
    .sekk-topbar {
        gap: 8px;
        padding: 6px 8px;
    }
    .sekk-title {
        display: none;
    }
    .sekk-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    .sekk-tool {
        padding: 6px 8px;
        font-size: 12px;
    }
    .sekk-tool-main {
        padding: 9px 13px;
        font-size: 14px;
    }
}
