/* IWC Cookie Banner - frontend styles */
/* All colors/fonts driven by CSS vars injected via PHP (build_css_vars) */

:root {
    --iwc-cb-bg:             #1a1a2e;
    --iwc-cb-text:           #e8e8f0;
    --iwc-cb-accept-bg:      #4361EE;
    --iwc-cb-accept-text:    #ffffff;
    --iwc-cb-decline-bg:     transparent;
    --iwc-cb-decline-text:   #9ca3af;
    --iwc-cb-decline-border: #4b5563;
    --iwc-cb-font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --iwc-cb-font-size:      14px;
    --iwc-cb-radius:         10px;
    --iwc-cb-shadow:         0 -4px 24px rgba(0,0,0,.18);
    --iwc-cb-z:              99999;
}

/* ── Base ──────────────────────────────────────────── */
.iwc-cb {
    position: fixed;
    z-index: var(--iwc-cb-z);
    font-family: var(--iwc-cb-font);
    font-size: var(--iwc-cb-font-size);
    line-height: 1.5;
    box-sizing: border-box;
}
.iwc-cb *, .iwc-cb *::before, .iwc-cb *::after { box-sizing: inherit; }

/* ── Positions ──────────────────────────────────────── */
.iwc-cb--bottom       { bottom: 0; left: 0; right: 0; }
.iwc-cb--top          { top: 0;    left: 0; right: 0; }
.iwc-cb--bottom-left  { bottom: 20px; left: 20px; max-width: 420px; }
.iwc-cb--bottom-right { bottom: 20px; right: 20px; max-width: 420px; }

/* ── Styles ─────────────────────────────────────────── */
/* Bar (full-width) */
.iwc-cb--bar .iwc-cb__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    background: var(--iwc-cb-bg);
    padding: 14px 24px;
    color: var(--iwc-cb-text);
}
.iwc-cb--bar .iwc-cb__actions {
    background: var(--iwc-cb-bg);
    padding: 0 24px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
@media (min-width: 640px) {
    .iwc-cb--bar .iwc-cb__inner  { flex-wrap: nowrap; }
    .iwc-cb--bar .iwc-cb__actions {
        padding: 14px 24px;
        border-top: none;
        justify-content: flex-end;
    }
    .iwc-cb--bar {
        display: flex;
        align-items: center;
    }
    .iwc-cb--bar .iwc-cb__inner  { flex: 1; padding: 14px 24px; }
    .iwc-cb--bar .iwc-cb__actions { padding: 14px 24px 14px 0; }
}

/* Popup (centered) */
.iwc-cb--popup {
    top: 50% !important; left: 50% !important; right: auto !important; bottom: auto !important;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: calc(100% - 40px);
    border-radius: var(--iwc-cb-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.iwc-cb--popup .iwc-cb__inner {
    background: var(--iwc-cb-bg);
    padding: 28px 28px 16px;
    color: var(--iwc-cb-text);
    border-radius: var(--iwc-cb-radius) var(--iwc-cb-radius) 0 0;
}
.iwc-cb--popup .iwc-cb__actions {
    background: var(--iwc-cb-bg);
    padding: 0 28px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-radius: 0 0 var(--iwc-cb-radius) var(--iwc-cb-radius);
}

/* Floating (corner) */
.iwc-cb--floating {
    border-radius: var(--iwc-cb-radius);
    box-shadow: var(--iwc-cb-shadow);
    overflow: hidden;
}
.iwc-cb--floating .iwc-cb__inner {
    background: var(--iwc-cb-bg);
    padding: 20px 20px 12px;
    color: var(--iwc-cb-text);
}
.iwc-cb--floating .iwc-cb__actions {
    background: var(--iwc-cb-bg);
    padding: 0 20px 18px;
    display: flex;
    gap: 8px;
}

/* ── Shared inner elements ───────────────────────────── */
.iwc-cb__inner { flex: 1; }
.iwc-cb__title {
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 1.05em;
    color: var(--iwc-cb-text);
}
.iwc-cb__message {
    margin: 0;
    color: var(--iwc-cb-text);
    opacity: .88;
}
.iwc-cb__policy {
    display: inline-block;
    margin-top: 6px;
    color: var(--iwc-cb-accept-bg);
    font-size: .85em;
    text-decoration: underline;
}

/* ── Buttons ─────────────────────────────────────────── */
.iwc-cb__btn {
    padding: 9px 20px;
    border-radius: 6px;
    font-size: var(--iwc-cb-font-size);
    font-family: var(--iwc-cb-font);
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    line-height: 1;
}
.iwc-cb__btn:active { transform: scale(.97); }
.iwc-cb__btn--accept {
    background: var(--iwc-cb-accept-bg);
    color: var(--iwc-cb-accept-text);
    border: none;
}
.iwc-cb__btn--accept:hover { opacity: .9; }
.iwc-cb__btn--decline {
    background: var(--iwc-cb-decline-bg);
    color: var(--iwc-cb-decline-text);
    border: 1px solid var(--iwc-cb-decline-border);
}
.iwc-cb__btn--decline:hover { opacity: .75; }

/* ── Animations ─────────────────────────────────────── */

/* Slide (bottom variants) */
.iwc-cb--bottom.iwc-cb--anim-slide,
.iwc-cb--bottom-left.iwc-cb--anim-slide,
.iwc-cb--bottom-right.iwc-cb--anim-slide {
    transform: translateY(110%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.iwc-cb--top.iwc-cb--anim-slide {
    transform: translateY(-110%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.iwc-cb--popup.iwc-cb--anim-slide {
    transform: translate(-50%, -50%) scale(.92);
    transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
    opacity: 0;
}
.iwc-cb--anim-slide.iwc-cb--visible.iwc-cb--bottom,
.iwc-cb--anim-slide.iwc-cb--visible.iwc-cb--bottom-left,
.iwc-cb--anim-slide.iwc-cb--visible.iwc-cb--bottom-right { transform: translateY(0); }
.iwc-cb--anim-slide.iwc-cb--visible.iwc-cb--top          { transform: translateY(0); }
.iwc-cb--anim-slide.iwc-cb--visible.iwc-cb--popup        { transform: translate(-50%,-50%) scale(1); opacity: 1; }

/* Fade */
.iwc-cb--anim-fade     { opacity: 0; transition: opacity .4s; }
.iwc-cb--anim-fade.iwc-cb--visible { opacity: 1; }

/* None - just show */
.iwc-cb--anim-none { transition: none; }

/* Backdrop for popup */
#iwc-cookie-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: calc(var(--iwc-cb-z) - 1);
    backdrop-filter: blur(2px);
}
#iwc-cookie-backdrop.iwc-cb--visible { display: block; }
