/* ─────────────────────────────────────────────────────────────────
   Rezble cookie consent – samostojen CSS (deluje brez Tailwinda)
   Barve: forest #1B4332 / cream #FAFAF5 / terracotta #C4704B / sage #A3B18A
   ───────────────────────────────────────────────────────────────── */

.rez-cc, .rez-cc *,
.rez-cc *::before, .rez-cc *::after { box-sizing: border-box; }

.rez-cc {
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #1B4332;
    line-height: 1.5;
    font-size: 14px;
}
.rez-cc[hidden] { display: none !important; }

/* ── Banner (fixed bottom) ─────────────────────────────────────── */
.rez-cc-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 2147483600;
    background: #FAFAF5;
    color: #1B4332;
    border: 1px solid #DAD7CD;
    border-radius: 16px;
    box-shadow: 0 24px 48px -16px rgba(8, 28, 21, .35), 0 4px 16px rgba(8, 28, 21, .12);
    padding: 18px 20px;
    max-width: 1080px;
    margin: 0 auto;
}
.rez-cc-banner[hidden] { display: none; }

.rez-cc-banner-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}
.rez-cc-banner-text { flex: 1 1 320px; min-width: 0; }
.rez-cc-banner-text h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #1B4332;
}
.rez-cc-banner-text p {
    margin: 0;
    font-size: 13.5px;
    color: rgba(27, 67, 50, .8);
}
.rez-cc-banner-text a {
    color: #C4704B;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rez-cc-banner-text a:hover { color: #A85D3B; }

.rez-cc-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ── Buttons (uporabljene v banneru in modalu) ─────────────────── */
.rez-cc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, color .15s, transform .05s;
    line-height: 1;
    white-space: nowrap;
}
.rez-cc-btn:active { transform: translateY(1px); }
.rez-cc-btn:focus-visible {
    outline: 2px solid #C4704B;
    outline-offset: 2px;
}
.rez-cc-btn-primary {
    background: #C4704B;
    color: #fff;
    border-color: #C4704B;
}
.rez-cc-btn-primary:hover { background: #A85D3B; border-color: #A85D3B; }
.rez-cc-btn-ghost {
    background: transparent;
    color: #1B4332;
    border-color: #DAD7CD;
}
.rez-cc-btn-ghost:hover { background: rgba(27, 67, 50, .06); border-color: #A3B18A; }

/* ── Modal (granularne nastavitve) ─────────────────────────────── */
.rez-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483601;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.rez-cc-modal[hidden] { display: none; }

.rez-cc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 28, 21, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.rez-cc-modal-card {
    position: relative;
    background: #FAFAF5;
    color: #1B4332;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px -16px rgba(8, 28, 21, .55);
    overflow: hidden;
}

.rez-cc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid #DAD7CD;
}
.rez-cc-modal-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1B4332;
}
.rez-cc-modal-close {
    appearance: none;
    background: transparent;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: rgba(27, 67, 50, .65);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}
.rez-cc-modal-close:hover { background: rgba(27, 67, 50, .08); color: #1B4332; }

.rez-cc-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.rez-cc-modal-intro {
    margin: 0 0 16px;
    font-size: 13.5px;
    color: rgba(27, 67, 50, .75);
}
.rez-cc-modal-intro a {
    color: #C4704B;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.rez-cc-modal-intro a:hover { color: #A85D3B; }

.rez-cc-cat {
    border: 1px solid #DAD7CD;
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 0 0 10px;
}
.rez-cc-cat:last-child { margin-bottom: 0; }
.rez-cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.rez-cc-cat-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #1B4332;
}
.rez-cc-cat-always {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #2D6A4F;
    background: rgba(163, 177, 138, .25);
    padding: 4px 10px;
    border-radius: 999px;
}
.rez-cc-cat-desc {
    margin: 8px 0 0;
    font-size: 12.5px;
    color: rgba(27, 67, 50, .7);
}

/* ── Toggle switch ─────────────────────────────────────────────── */
.rez-cc-toggle {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    user-select: none;
}
.rez-cc-toggle input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}
.rez-cc-toggle-track {
    width: 40px;
    height: 22px;
    background: #DAD7CD;
    border-radius: 999px;
    position: relative;
    transition: background-color .2s;
}
.rez-cc-toggle-knob {
    position: absolute;
    top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    transition: transform .2s;
}
.rez-cc-toggle input:checked + .rez-cc-toggle-track { background: #C4704B; }
.rez-cc-toggle input:checked + .rez-cc-toggle-track .rez-cc-toggle-knob { transform: translateX(18px); }
.rez-cc-toggle input:focus-visible + .rez-cc-toggle-track {
    outline: 2px solid #C4704B;
    outline-offset: 2px;
}

.rez-cc-modal-foot {
    display: flex;
    gap: 8px;
    padding: 16px 24px 20px;
    border-top: 1px solid #DAD7CD;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rez-cc-banner {
        left: 8px; right: 8px; bottom: 8px;
        padding: 16px;
        border-radius: 14px;
    }
    .rez-cc-banner-inner { gap: 14px; }
    .rez-cc-banner-actions { width: 100%; }
    .rez-cc-banner-actions .rez-cc-btn { flex: 1 1 auto; }
    .rez-cc-modal-foot { flex-direction: column-reverse; }
    .rez-cc-modal-foot .rez-cc-btn { width: 100%; }
}
