/*!
 * Merkliste / Wishlist - whsite
 *
 * ACHTUNG: Diese Datei wird - anders als layout.css, blog.css, cookies.css
 * und rte.css - NICHT aus Resources/Public/Scss/ generiert. Sie wird direkt
 * gepflegt. Nicht in den Grunt-Build aufnehmen, sonst wird sie ueberschrieben.
 *
 * Eingebunden ueber page.includeCSS in
 * Configuration/TypoScript/Page/Page.typoscript und .../CH/Page/Page.typoscript
 * Zugehoeriges JS: Resources/Public/JavaScript/scripts_dev.js (Wishlist)
 */

body.wk-modal-open { overflow: hidden; }

/* ── Cart-Button + Badges ───────────────────────────────────────────────── */

#wk-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: inherit;
}
#wk-cart-btn:hover { opacity: .7; }

.wk-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border-radius: 9px;
}
.wk-cart-badge.wk-badge-pop {
    animation: wk-pop .45s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes wk-pop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.65); }
    65%  { transform: scale(.88); }
    100% { transform: scale(1); }
}

#navToggler { position: relative; }
#wk-toggler-badge { position: absolute; top: -6px; right: -6px; }

/* ── Modal ──────────────────────────────────────────────────────────────── */

#wk-cart-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    justify-content: flex-end;
    align-items: flex-end;
}
#wk-cart-modal.is-open { display: flex; }

.wk-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
}

.wk-panel {
    position: relative;
    width: 420px;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px 0 0 0;
    overflow: hidden;
}
.wk-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e5e5;
}
.wk-panel-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}
.wk-close {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    padding: 4px;
    line-height: 1;
}
.wk-close:hover { color: #000; }

.wk-panel-body { flex: 1; overflow-y: auto; }
.wk-empty {
    padding: 32px 20px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* ── Eintrag ────────────────────────────────────────────────────────────── */

.wk-item { border-bottom: 1px solid #f0f0f0; }
.wk-item:last-child { border-bottom: none; }

.wk-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
}
.wk-item-info { flex: 1; min-width: 0; }
.wk-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wk-item-links {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}
.wk-item-url,
.wk-item-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    text-decoration: none;
}
.wk-item-url:hover,
.wk-item-toggle:hover { text-decoration: underline; color: #666; }

.wk-item-toggle {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}
.wk-item-toggle .wk-toggle-icon { transition: transform .2s; }
.wk-item-toggle[aria-expanded="true"] .wk-toggle-icon { transform: rotate(180deg); }

.wk-item-del {
    border: none;
    background: none;
    cursor: pointer;
    color: #bbb;
    font-size: 15px;
    padding: 6px;
    flex-shrink: 0;
    transition: color .15s;
}
.wk-item-del:hover { color: #c0392b; }

/* ── Detailansicht (per Middleware nachgeladen) ─────────────────────────── */

.wk-details {
    padding: 0 20px 16px 20px;
    font-size: 12px;
    color: #444;
}
.wk-details[hidden] { display: none; }

.wk-details-status {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    color: #888;
}
.wk-details-status--error { color: #c0392b; }

.wk-article + .wk-article {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e5e5e5;
}
.wk-article-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}
.wk-article-title { font-weight: 600; color: #1a1a1a; }
.wk-article-artnr {
    margin-left: auto;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    color: #999;
}

.wk-feature-list {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: 3px 12px;
    margin: 0;
}
.wk-feature-list dt { color: #888; }
.wk-feature-list dd { margin: 0; color: #1a1a1a; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.wk-panel-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e5e5e5;
}
.wk-btn-clear {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.wk-btn-clear:hover { background: #f5f5f5; }

.wk-btn-checkout {
    flex: 1;
    padding: 10px 16px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wk-btn-checkout:hover { background: #333; color: #fff; }
.wk-btn-checkout--disabled,
.wk-btn-checkout--disabled:hover {
    background: #ccc;
    color: #888;
    pointer-events: none;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */

#wk-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    z-index: 10000;
}
#wk-toast.wk-toast--in { opacity: 1; transform: translateX(-50%) translateY(0); }
#wk-toast.wk-toast--ok { background: #1a1a1a; color: #fff; }
#wk-toast.wk-toast--warn { background: #f39c12; color: #fff; }

@media (prefers-reduced-motion: reduce) {
    .wk-cart-badge.wk-badge-pop { animation: none; }
    .wk-item-toggle .wk-toggle-icon,
    #wk-toast { transition: none; }
}
