/**
 * Cookie Consent Banner Styles
 *
 * Professional, accessible, and responsive styling for the cookie consent banner.
 * Matches Chatari's design language with purple accent colors.
 *
 * @author Chatari Development Team
 * @version 1.0.0
 */

/* Banner Container */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1b3d 100%);
    color: #ffffff;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    backdrop-filter: blur(10px);
    background-color: rgba(26, 26, 26, 0.95);
}

/* Show state animation */
.cookie-consent-banner.show {
    transform: translateY(0);
}

/* Container for max-width */
.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Content wrapper */
.cookie-consent-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Text content */
.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

/* Title with emoji */
.cookie-consent-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Description text */
.cookie-consent-description {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* Privacy policy link */
.cookie-consent-link {
    color: #a78bfa;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
    margin-left: 4px;
}

.cookie-consent-link:hover {
    color: #c4b5fd;
    text-decoration-thickness: 2px;
}

.cookie-consent-link:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Actions container */
.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Base button styles */
.cookie-consent-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 110px;
    white-space: nowrap;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Button hover effect */
.cookie-consent-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cookie-consent-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Button focus styles for accessibility */
.cookie-consent-btn:focus {
    outline: 3px solid #8b5cf6;
    outline-offset: 2px;
}

.cookie-consent-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Accept button - primary CTA */
.consent-accept {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.25);
}

.consent-accept:hover {
    background: linear-gradient(135deg, #9333ea 0%, #8b5cf6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.consent-accept:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

/* Decline button - secondary */
.consent-decline {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.consent-decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

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

/* Customize button - tertiary */
.consent-customize {
    background: transparent;
    color: #a78bfa;
    border: 1px solid #8b5cf6;
}

.consent-customize:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #a78bfa;
    color: #c4b5fd;
    transform: translateY(-2px);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading state for buttons */
.cookie-consent-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.cookie-consent-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .cookie-consent-container {
        padding: 0 16px;
    }

    .cookie-consent-content {
        gap: 24px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 16px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .cookie-consent-text {
        min-width: unset;
    }

    .cookie-consent-title {
        justify-content: center;
        font-size: 16px;
    }

    .cookie-consent-description {
        font-size: 13px;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-consent-btn {
        flex: 1;
        max-width: 140px;
        padding: 10px 16px;
        font-size: 13px;
        min-width: 90px;
    }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Accessibility - High contrast mode */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top: 2px solid white;
    }

    .cookie-consent-btn {
        border: 2px solid currentColor;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }

    .cookie-consent-btn {
        transition: none;
    }

    .cookie-consent-btn::before {
        display: none;
    }

    @keyframes spin {
        to {
            transform: none;
        }
    }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    .cookie-consent-banner {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a0f2e 100%);
    }
}

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