/**
 * D-SERV DIGITAL CLUB - Banner Styles
 * Promo Banner (Top) & Cookie Consent Banner (Bottom)
 */

/* ============================================
   PROMO BANNER (Top, Admin Managed)
   ============================================ */

.promo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 0.875rem 3.5rem 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    min-height: 3rem;
    background: linear-gradient(135deg, var(--promo-bg-start, #3b82f6) 0%, var(--promo-bg-end, #2563eb) 100%);
    color: var(--promo-text-color, #ffffff);
}

.promo-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    line-height: 1.4;
}

.promo-message {
    text-align: center;
    flex: 1 1 auto;
    min-width: 0;
}

.promo-link {
    text-decoration: underline;
    font-weight: 600;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--promo-text-color, #ffffff);
}

.promo-link:hover {
    opacity: 0.8;
}

.promo-close {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: inherit;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.promo-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.promo-close:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Adjust header position when promo banner is visible */
body:has(.promo-banner:not(.hidden)) header {
    top: 3rem;
}

/* Add padding to main content when promo banner is visible */
body:has(.promo-banner:not(.hidden)) main,
body:has(.promo-banner:not(.hidden)) > section,
body:has(.promo-banner:not(.hidden)) > div:not(.promo-banner):not(.cookie-consent-banner) {
    padding-top: 3rem;
}

/* Tablet adjustments */
@media (max-width: 1024px) {
    .promo-banner {
        font-size: 0.8125rem;
        padding: 0.75rem 3rem 0.75rem 0.875rem;
    }
    
    .promo-content {
        gap: 0.5rem;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .promo-banner {
        padding: 1rem 3.5rem 1rem 1rem;
        font-size: 0.8125rem;
        min-height: auto;
        align-items: flex-start;
    }
    
    .promo-content {
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .promo-message {
        text-align: left;
        width: 100%;
        line-height: 1.4;
        padding-right: 0.5rem;
    }
    
    .promo-link {
        font-size: 0.8125rem;
        align-self: flex-start;
        padding: 0.25rem 0;
        text-decoration-thickness: 2px;
        text-underline-offset: 2px;
    }
    
    .promo-close {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.5rem;
        right: 0.625rem;
        top: 0.625rem;
        transform: none;
        border-radius: 0.5rem;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(4px);
    }
    
    .promo-close:hover,
    .promo-close:active {
        background: rgba(0, 0, 0, 0.5);
    }
    
    body:has(.promo-banner:not(.hidden)) header {
        top: auto;
        margin-top: 5rem;
    }
    
    /* Adjust main content padding on mobile */
    body:has(.promo-banner:not(.hidden)) main,
    body:has(.promo-banner:not(.hidden)) > section,
    body:has(.promo-banner:not(.hidden)) > div:not(.promo-banner):not(.cookie-consent-banner) {
        padding-top: 5rem;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .promo-banner {
        padding: 0.875rem 3.25rem 0.875rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    .promo-message {
        font-size: 0.8125rem;
        line-height: 1.4;
    }
    
    .promo-link {
        font-size: 0.8125rem;
        font-weight: 700;
    }
    
    .promo-close {
        width: 2rem;
        height: 2rem;
        font-size: 1.375rem;
        right: 0.5rem;
        top: 0.5rem;
    }
    
    body:has(.promo-banner:not(.hidden)) header {
        margin-top: 4.75rem;
    }
    
    /* Adjust main content padding on extra small mobile */
    body:has(.promo-banner:not(.hidden)) main,
    body:has(.promo-banner:not(.hidden)) > section,
    body:has(.promo-banner:not(.hidden)) > div:not(.promo-banner):not(.cookie-consent-banner) {
        padding-top: 4.75rem;
    }
}

/* ============================================
   COOKIE CONSENT BANNER (Bottom)
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(17, 24, 39, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-consent-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-consent-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cookie-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cookie-text {
    flex: 1;
    min-width: 0;
}

.cookie-message {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: rgba(255, 255, 255, 0.05);
    color: #d1d5db;
    border-color: rgba(255, 255, 255, 0.1);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1rem;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-icon {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .cookie-message {
        font-size: 0.8125rem;
    }
    
    .cookie-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}
