/* ============================================
   COOKIE CONSENT BANNER STYLING
   ============================================ */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(227deg, var(--bsr-mint) 0%, #A8C8BB 100%);
    color: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
    opacity: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
}

.cookie-consent-banner:focus,
.cookie-consent-banner:focus-visible,
.cookie-consent-banner:focus-within {
    outline: none !important;
    border: none !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
}

.cookie-consent-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-consent-banner.hide {
    transform: translateY(100%);
    opacity: 0;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    outline: none !important;
    border: none !important;
}

/* Disable styling on focus states */
.cookie-consent-container:active,
.cookie-consent-container:focus,
.cookie-consent-container:focus-within,
.cookie-consent-container:focus-visible {
    all: revert;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    border: none !important;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    padding-right: 60px; /* Make room for close button on desktop */
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: white;
}

.cookie-consent-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Cookie Buttons */
.cookie-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 0;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.cookie-accept {
    background: white !important;
    color: #2D5A3D !important;
    border-color: white !important;
}

.cookie-accept:hover {
    background: #06BCC1 !important;
    color: white !important;
    border-color: #06BCC1 !important;
}

.cookie-decline:hover {
    background: transparent !important;
    border-color: #06BCC1 !important;
    color: #06BCC1 !important;
}

.cookie-privacy-link {
    color: white;
    text-decoration: underline;
    font-size: 12px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.cookie-privacy-link:hover {
    color: #E8F5E8;
    text-decoration: none;
}

/* Close Button */
.cookie-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

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

@media (max-width: 768px) {
    .cookie-consent-container {
        padding: 15px 10px;
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        max-width: 100%;
        width: calc(100% - 20px);
        margin: 0 10px;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding-right: 45px; /* Reduced padding on mobile for close button */
    }
    
    .cookie-consent-text {
        padding-right: 0; /* Remove extra padding on mobile */
    }
    
    .cookie-consent-text p {
        font-size: 13px;
        text-align: center;
        margin: 0;
        line-height: 1.4;
    }
    
    .cookie-consent-buttons {
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .cookie-btn {
        min-width: 80px;
        max-width: calc(50% - 5px);
        padding: 10px 16px;
        font-size: 12px;
        flex: 1;
    }
    
    .cookie-privacy-link {
        font-size: 11px;
        margin-top: 5px;
        text-align: center;
        display: block;
        width: 100%;
    }
    
    /* Keep X button in top right corner on mobile */
    .cookie-close {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
        z-index: 1;
    }
    
    .cookie-consent-banner {
        margin: 0;
        border-radius: 0;
    }
}

@media (max-width: 480px) {
    .cookie-consent-container {
        padding: 12px;
    }
    
    .cookie-consent-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .cookie-btn {
        width: 100%;
        min-width: auto;
    }
    
    .cookie-privacy-link {
        text-align: center;
        margin-top: 8px;
    }
}

/* ============================================
   ANIMATION EFFECTS
   ============================================ */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-banner.animate-in {
    animation: slideUp 0.4s ease-out forwards;
}

.cookie-consent-banner.animate-out {
    animation: slideDown 0.4s ease-out forwards;
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

.cookie-consent-banner:focus-within {
    outline: 2px solid #E8F5E8;
    outline-offset: 2px;
}

.cookie-btn:focus,
.cookie-privacy-link:focus,
.cookie-close:focus {
    outline: 2px solid #E8F5E8;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        background: #2D5A3D;
        border-top: 3px solid #fff;
    }
    
    .cookie-btn {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }
    
    .cookie-btn {
        transition: none;
    }
    
    .cookie-close {
        transition: none;
    }
    
    .cookie-btn:hover {
        transform: none;
    }
    
    .cookie-close:hover {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .cookie-consent-banner {
        display: none !important;
    }
}