/* ============================================================
   COOKIE CONSENT BANNER — GDPR Compliant
   File: css/modules/cookie-consent.css
   ============================================================ */

/* Backdrop overlay */
.cookie-consent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.cookie-consent-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Inter', 'Poppins', sans-serif;
}

.cookie-consent.active {
    transform: translateY(0);
}

.cookie-consent-inner {
    background: #1a1a2e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
    padding: 28px 0;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent line at top */
.cookie-consent-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #e67e22, #f39c12, #e67e22);
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Cookie icon */
.cookie-consent-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(230, 126, 34, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Content area */
.cookie-consent-content {
    flex: 1;
    min-width: 0;
}

.cookie-consent-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.cookie-consent-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin: 0 0 4px 0;
}

.cookie-consent-text a {
    color: #e67e22;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.cookie-consent-text a:hover {
    color: #f39c12;
    text-decoration: underline;
}

/* Button area */
.cookie-consent-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.cookie-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* Accept All — Primary CTA */
.cookie-btn-accept {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.45);
    transform: translateY(-1px);
}

/* Customize — Secondary */
.cookie-btn-customize {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-btn-customize:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Reject — Tertiary */
.cookie-btn-reject {
    background: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
}

.cookie-btn-reject:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   PREFERENCES PANEL (shown when "Customize" is clicked)
   ============================================================ */

.cookie-preferences {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-preferences.active {
    max-height: 400px;
    padding: 20px 24px 0;
}

.cookie-pref-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.cookie-pref-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: border-color 0.2s;
}

.cookie-pref-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.cookie-pref-item label {
    cursor: pointer;
    flex: 1;
}

.cookie-pref-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.cookie-pref-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #e67e22;
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-pref-required {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Save preferences button */
.cookie-pref-save {
    text-align: right;
    padding-top: 14px;
}

/* ============================================================
   FLOATING RE-OPEN BUTTON (after consent given)
   ============================================================ */

.cookie-consent-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99997;
    width: 44px;
    height: 44px;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cookie-consent-reopen.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.cookie-consent-reopen:hover {
    background: #e67e22;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .cookie-consent-icon {
        display: none;
    }
    
    .cookie-consent-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    .cookie-pref-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-consent-inner {
        padding: 20px 0;
    }
}
