/* ============================================================
   Hornik Solutions - Cookie Consent UI
   Banner (bottom bar) + Preferences Modal
   ============================================================ */

/* ── Shared button styles ─────────────────────────────────── */
.hs-cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    white-space: nowrap;
    border: 1px solid transparent;
    font-family: inherit;
}

.hs-cb-btn--primary {
    background: #c9aa71;
    color: #0f0f0f;
    border-color: #c9aa71;
}

.hs-cb-btn--primary:hover {
    background: #e0c888;
    border-color: #e0c888;
}

.hs-cb-btn--outline {
    background: transparent;
    color: #c9aa71;
    border-color: #c9aa71;
}

.hs-cb-btn--outline:hover {
    background: rgba(201, 170, 113, 0.1);
}

.hs-cb-btn--ghost {
    background: transparent;
    color: #aaa;
    border-color: #444;
}

.hs-cb-btn--ghost:hover {
    color: #fff;
    border-color: #888;
}

/* ── Cookie Banner ────────────────────────────────────────── */
#hs-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: #0a0a0a;
    border-top: 3px solid #c9aa71;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
    padding: 32px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#hs-cookie-banner.hs-cookie-banner--visible {
    transform: translateY(0);
}

#hs-cookie-banner.hs-cookie-banner--hidden {
    transform: translateY(100%);
}

.hs-cb-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}

.hs-cb-text {
    flex: 1 1 500px;
}

.hs-cb-text strong {
    display: block;
    color: #c9aa71;
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.hs-cb-text p {
    color: #e0e0e0;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
}

.hs-cb-actions {
    display: flex;
    gap: 32px;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
}

.hs-cb-link {
    color: #aaa !important;
    text-decoration: underline !important;
    font-size: 0.95rem;
    transition: color 0.2s;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    display: inline;
}

.hs-cb-link:hover {
    color: #fff;
}

/* ── Cookie Modal ─────────────────────────────────────────── */
#hs-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#hs-cookie-modal.hs-cookie-modal--visible {
    opacity: 1;
}

#hs-cookie-modal.hs-cookie-modal--hidden {
    opacity: 0;
    pointer-events: none;
}

.hs-cm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.hs-cm-panel {
    position: relative;
    z-index: 1;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    width: min(520px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.hs-cm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.hs-cm-intro {
    font-size: 0.875rem;
    color: #888;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* ── Category rows ─────────────────────────────────────────── */
.hs-cm-category {
    border-top: 1px solid #2a2a2a;
    padding: 16px 0;
}

.hs-cm-category:last-of-type {
    border-bottom: 1px solid #2a2a2a;
}

.hs-cm-cat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hs-cm-cat-header>div {
    flex: 1;
}

.hs-cm-cat-header strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.hs-cm-cat-header p {
    color: #888;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

.hs-cm-always-on {
    font-size: 0.75rem;
    color: #c9aa71;
    font-weight: 600;
    margin-top: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Toggle switch ─────────────────────────────────────────── */
.hs-cm-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
}

.hs-cm-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.hs-cm-toggle-slider {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 24px;
    transition: background 0.2s;
    border: 1px solid #444;
}

.hs-cm-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: #888;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.hs-cm-toggle input:checked+.hs-cm-toggle-slider {
    background: rgba(201, 170, 113, 0.2);
    border-color: #c9aa71;
}

.hs-cm-toggle input:checked+.hs-cm-toggle-slider::before {
    transform: translate(20px, -50%);
    background: #c9aa71;
}

.hs-cm-toggle input:focus-visible+.hs-cm-toggle-slider {
    outline: 2px solid #c9aa71;
    outline-offset: 2px;
}

/* ── Modal footer ──────────────────────────────────────────── */
.hs-cm-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    #hs-cookie-banner {
        padding: 16px;
    }

    .hs-cb-inner {
        gap: 14px;
    }

    .hs-cb-actions {
        width: 100%;
        gap: 20px;
        justify-content: center;
        flex-direction: column;
    }

    .hs-cb-btn {
        width: 100%;
        text-align: center;
    }

    .hs-cb-link {
        margin: 8px 0;
    }

    .hs-cm-panel {
        padding: 24px 20px;
    }

    .hs-cm-footer {
        flex-direction: column;
    }

    .hs-cm-footer .hs-cb-btn {
        width: 100%;
    }
}