/* =========================================================
   Villa Valhalla – Cookie Consent
   ========================================================= */

:root {
    --cc-gold: #a96743;
    --cc-gold-dark: #8a5235;
    --cc-cream: #ebe2d4;
    --cc-text: #2c2c2c;
    --cc-text-muted: #5a5a5a;
    --cc-bg: #ffffff;
    --cc-border: #d6c9b8;
    --cc-radius: 6px;
    --cc-shadow: 0 4px 24px rgba(0, 0, 0, 0.14);
    --cc-toggle-on: #a96743;
    --cc-toggle-off: #ccc;
    --cc-toggle-thumb: #ffffff;
}

/* ---- Banner -------------------------------------------- */

#stiner-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99900;
    background: var(--cc-bg);
    border-top: 2px solid var(--cc-cream);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.10);
    padding: 16px 24px;
}

.stiner-cb-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: nowrap;
}

.stiner-cb-text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.875rem;
    color: var(--cc-text-muted);
    line-height: 1.5;
}

.stiner-cb-link {
    color: var(--cc-gold);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.stiner-cb-link:hover {
    color: var(--cc-gold-dark);
}

.stiner-cb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    min-width: 480px;
}


/* ---- Shared button styles ------------------------------ */

.stiner-cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: var(--cc-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
}

.stiner-cb-btn--primary {
    background: var(--cc-gold);
    color: #ffffff;
    border-color: var(--cc-gold);
}

.stiner-cb-btn--primary:hover {
    background: var(--cc-gold-dark);
    border-color: var(--cc-gold-dark);
}

.stiner-cb-btn--secondary {
    background: transparent;
    color: var(--cc-gold);
    border-color: var(--cc-gold);
}

.stiner-cb-btn--secondary:hover {
    background: var(--cc-cream);
}

/* ---- Modal overlay ------------------------------------- */

#stiner-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stiner-cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

/* ---- Modal dialog -------------------------------------- */

.stiner-cm-dialog {
    position: relative;
    z-index: 1;
    background: var(--cc-bg);
    border-radius: 10px;
    box-shadow: var(--cc-shadow);
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100svh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stiner-cm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--cc-border);
    background: var(--cc-cream);
}

.stiner-cm-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--cc-text);
}

.stiner-cm-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--cc-text-muted);
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.stiner-cm-close:hover {
    color: var(--cc-text);
    background: rgba(0, 0, 0, 0.07);
}

.stiner-cm-body {
    overflow-y: auto;
    padding: 8px 24px;
    flex: 1 1 auto;
}

/* ---- Category rows ------------------------------------- */

.stiner-cm-category {
    border-bottom: 1px solid var(--cc-border);
    padding: 16px 0;
}

.stiner-cm-category:last-child {
    border-bottom: none;
}

.stiner-cm-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.stiner-cm-category-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stiner-cm-category-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--cc-text);
}

.stiner-cm-category-desc {
    font-size: 0.8125rem;
    color: var(--cc-text-muted);
    line-height: 1.45;
}

/* ---- Toggle switch ------------------------------------- */

.stiner-cm-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
}

.stiner-cm-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.stiner-cm-toggle-track {
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--cc-toggle-off);
    padding: 2px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.stiner-cm-toggle input:checked ~ .stiner-cm-toggle-track {
    background: var(--cc-toggle-on);
}

.stiner-cm-toggle-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cc-toggle-thumb);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.stiner-cm-toggle input:checked ~ .stiner-cm-toggle-track .stiner-cm-toggle-thumb {
    transform: translateX(20px);
}

.stiner-cm-toggle--locked {
    cursor: default;
    opacity: 0.4;
}

.stiner-cm-toggle--locked .stiner-cm-toggle-track {
    background: var(--cc-toggle-on);
}

.stiner-cm-toggle--locked .stiner-cm-toggle-thumb {
    transform: translateX(20px);
}

.stiner-cm-always-on {
    font-size: 0.75rem;
    color: var(--cc-gold);
    font-weight: 600;
    white-space: nowrap;
}

/* ---- Modal footer -------------------------------------- */

.stiner-cm-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--cc-border);
    background: var(--cc-bg);
}

/* ---- Footer link --------------------------------------- */

#stiner-cookie-footer-link {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--cc-text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

#stiner-cookie-footer-link:hover {
    color: var(--cc-gold);
}

/* ---- Blocked iframe / external content placeholder ----- */

.stiner-cc-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: var(--cc-cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    padding: 24px;
    box-sizing: border-box;
}

.stiner-cc-placeholder p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--cc-text-muted);
    max-width: 300px;
    line-height: 1.5;
}

.stiner-cc-placeholder .stiner-cb-btn {
    font-size: 0.8125rem;
    padding: 8px 18px;
}

/* ---- [hidden] utility ---------------------------------- */

[hidden] { display: none !important; }

/* ---- Responsive ---------------------------------------- */
@media (max-width: 1024px) {
    .stiner-cb-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stiner-cb-actions {
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .stiner-cb-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .stiner-cb-actions {
        justify-content: stretch;
    }

    .stiner-cb-actions .stiner-cb-btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .stiner-cm-footer {
        flex-direction: column-reverse;
    }

    .stiner-cm-footer .stiner-cb-btn {
        width: 100%;
        justify-content: center;
    }
}
