/**
 * ==============================================================================
 * S&R CoreSync For Intelligent Solutions - Sovereign Platform
 * PROPRIETARY & CONFIDENTIAL INTELLECTUAL PROPERTY
 * 
 * Copyright (c) 2026 S&R CoreSync. All Rights Reserved.
 * Sovereign GDPR & Dutch AVG Cookie & Privacy Consent Hub (Royal Dark Luxury Edition)
 * ==============================================================================
 */

/* Container & Backdrop */
.sr-privacy-banner-wrap {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    margin: 0 auto;
    max-width: 1040px;
    z-index: 999998;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
}

.sr-privacy-banner-wrap.sr-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sr-privacy-banner {
    position: relative;
    background: rgba(6, 18, 14, 0.96);
    border: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.4);
    border-radius: 18px;
    padding: 18px 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.88), 0 0 30px rgba(var(--sr-gold-rgb, 212, 175, 55), 0.15);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    direction: rtl;
    text-align: right;
    font-family: 'Alexandria', 'Tajawal', system-ui, sans-serif;
    color: #e2e8f0;
}

html[dir="ltr"] .sr-privacy-banner {
    direction: ltr;
    text-align: left;
}

/* Banner Content */
.sr-privacy-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.sr-privacy-icon-box {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--sr-gold-rgb, 212, 175, 55), 0.22), rgba(16, 185, 129, 0.15));
    border: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f3dfba;
    box-shadow: 0 0 16px rgba(var(--sr-gold-rgb, 212, 175, 55), 0.25);
}

.sr-privacy-icon-box svg {
    width: 22px;
    height: 22px;
}

.sr-privacy-texts {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sr-privacy-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.sr-privacy-title span.badge-gdpr {
    font-size: 0.72rem;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 999px;
    color: #34d399;
    font-weight: 700;
}

.sr-privacy-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0;
}

/* Actions Strip */
.sr-privacy-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sr-privacy-btn {
    padding: 10px 18px;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    line-height: 1.2;
}

.sr-privacy-btn--accept {
    background: linear-gradient(135deg, #fce0ad 0%, #e8bf7a 50%, #d4af37 100%);
    color: #06150f;
    border: 1px solid rgba(255, 243, 214, 0.85);
    font-weight: 800;
    box-shadow: 0 4px 18px rgba(232, 191, 122, 0.35);
}

.sr-privacy-btn--accept:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fae6bd 50%, #dab471 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(232, 191, 122, 0.55), 0 0 20px rgba(255, 255, 255, 0.4);
}

.sr-privacy-btn--save {
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #a7f3d0;
}

.sr-privacy-btn--save:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: #34d399;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.sr-privacy-btn--reject {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.35);
    color: #f3dfba;
}

.sr-privacy-btn--reject:hover {
    background: rgba(var(--sr-gold-rgb, 212, 175, 55), 0.15);
    border-color: rgba(var(--sr-gold-rgb, 212, 175, 55), 0.65);
    color: #ffffff;
    transform: translateY(-2px);
}

.sr-privacy-btn--custom {
    background: transparent;
    color: #94a3b8;
    text-decoration: underline;
    font-size: 0.8rem;
    padding: 10px 10px;
}

.sr-privacy-btn--custom:hover {
    color: #d4af37;
}

/* ==============================================================================
 * Royal Sovereign Privacy Modal (Dark Luxury Edition)
 * ============================================================================== */
.sr-privacy-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sr-privacy-modal-overlay.sr-visible {
    opacity: 1;
    visibility: visible;
}

.sr-privacy-modal-card {
    background: rgba(6, 20, 16, 0.98);
    border: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.45);
    border-radius: 22px;
    max-width: 660px;
    width: 100%;
    padding: 28px 32px;
    box-shadow: 0 25px 65px rgba(0, 0, 0, 0.95), 0 0 35px rgba(var(--sr-gold-rgb, 212, 175, 55), 0.2);
    direction: rtl;
    text-align: right;
    font-family: 'Alexandria', 'Tajawal', system-ui, sans-serif;
    color: #e2e8f0;
    transform: scale(0.96) translateY(18px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

html[dir="ltr"] .sr-privacy-modal-card {
    direction: ltr;
    text-align: left;
}

.sr-privacy-modal-overlay.sr-visible .sr-privacy-modal-card {
    transform: scale(1) translateY(0);
}

.sr-privacy-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.22);
    margin-bottom: 22px;
    gap: 16px;
}

.sr-privacy-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sr-privacy-modal-header h3 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.sr-privacy-modal-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.4;
}

.sr-privacy-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sr-privacy-modal-close:hover {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.sr-privacy-pref-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    max-height: 360px;
    overflow-y: auto;
    padding-left: 6px;
}

.sr-privacy-pref-group::-webkit-scrollbar {
    width: 6px;
}
.sr-privacy-pref-group::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}
.sr-privacy-pref-group::-webkit-scrollbar-thumb {
    background: rgba(var(--sr-gold-rgb, 212, 175, 55), 0.35);
    border-radius: 999px;
}

.sr-privacy-pref-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.22);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.sr-privacy-pref-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(var(--sr-gold-rgb, 212, 175, 55), 0.4);
}

.sr-privacy-pref-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sr-privacy-pref-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sr-privacy-pref-info h4 {
    margin: 0;
    font-size: 0.94rem;
    color: #ffffff;
    font-weight: 700;
}

.badge-pref-status--locked {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(16, 185, 129, 0.38);
    color: #34d399;
    font-weight: 700;
}

.sr-privacy-pref-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Custom Emerald Switch Toggle */
.sr-privacy-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 4px;
}

.sr-privacy-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.sr-privacy-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
}

.sr-privacy-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: #ffffff;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sr-privacy-switch input:checked + .sr-privacy-slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.sr-privacy-switch input:disabled + .sr-privacy-slider {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(16, 185, 129, 0.28);
}

.sr-privacy-switch input:checked + .sr-privacy-slider:before {
    transform: translateX(20px);
}

.sr-privacy-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(var(--sr-gold-rgb, 212, 175, 55), 0.18);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sr-privacy-banner-wrap {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    
    .sr-privacy-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 16px 18px;
        gap: 16px;
    }
    
    .sr-privacy-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sr-privacy-btn {
        width: 100%;
    }

    .sr-privacy-modal-card {
        padding: 20px 18px;
    }

    .sr-privacy-modal-actions {
        flex-direction: column;
    }

    .sr-privacy-modal-actions .sr-privacy-btn {
        width: 100%;
    }
}


/* ---------------------------------------------------------------------------
   Slim bar (owner file). The card sat over the hero and hid it on a 768px
   screen. Same consent, same two answers, one line at the foot of the page.
   Declared last in this file so it wins over the card rules above.
   --------------------------------------------------------------------------- */
.sr-privacy-banner-wrap {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    max-width: 100%;
    transform: translateY(20px);
}
.sr-privacy-banner-wrap.sr-visible { transform: translateY(0); }

.sr-privacy-banner {
    border-radius: 0;
    border-inline: 0;
    border-bottom: 0;
    padding: 10px 20px;
    gap: 14px;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.55);
}
.sr-privacy-icon-box,
.sr-privacy-desc { display: none; }
.sr-privacy-texts { gap: 0; }
.sr-privacy-title { font-size: 0.86rem; }
.sr-privacy-actions { margin-inline-start: auto; flex-shrink: 0; }
.sr-privacy-btn { padding: 7px 16px; font-size: 0.8rem; white-space: nowrap; }

@media (max-width: 640px) {
    .sr-privacy-banner { flex-wrap: wrap; padding: 9px 12px; gap: 8px; }
    .sr-privacy-title { font-size: 0.78rem; line-height: 1.35; }
    .sr-privacy-actions { width: 100%; justify-content: flex-end; }
}
