/* 
 * Cookie Consent Styles
 * Improved version with better accessibility, animations, and mobile support
 */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(25, 25, 25, 0.9);
    /* Dark semi-transparent background */
    backdrop-filter: blur(5px);
    /* Blur effect for modern browsers */
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideUpBanner 0.3s ease-out forwards;
    display: none;
    font-family: 'Roboto', -apple-system, sans-serif;
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideUpBanner {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    /* Reduced padding */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /* Reduced gap */
}

.cookie-consent-content {
    flex: 1 1 500px;
}

.cookie-consent-title {
    font-size: 0.95rem;
    /* Smaller title */
    font-weight: 600;
    margin: 0 0 6px 0;
    /* Reduced margin */
    color: white;
}

.cookie-consent-description {
    font-size: 0.8rem;
    /* Smaller text */
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.cookie-settings-details {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 0 0;
    /* Reduced margin */
}

.cookie-type {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    /* Smaller padding */
    border-radius: 4px;
    margin: 0;
}

.cookie-info {
    margin-left: 8px;
}

.cookie-info h3 {
    font-size: 0.8rem;
    margin: 0 0 1px 0;
    color: white;
}

.cookie-info p {
    font-size: 0.7rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

/* Button styles */
.cookie-consent-banner .btn {
    padding: 6px 12px;
    /* Smaller buttons */
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.cookie-consent-banner .btn-primary {
    background-color: #6200EE;
    color: white;
    border: none;
}

.cookie-consent-banner .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-consent-banner .btn:hover {
    transform: translateY(-1px);
}

/* Toggle styling update */
.cookie-slider {
    background-color: rgba(255, 255, 255, 0.2);
}

.cookie-slider:before {
    background-color: rgba(255, 255, 255, 0.9);
}

input:checked+.cookie-slider {
    background-color: #6200EE;
}

.btn {
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid #6200EE;
    outline-offset: 2px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #6200EE;
    color: white;
}

.btn-primary:hover {
    background-color: #7c4dff;
}

.btn-secondary {
    background-color: #f5f5f5;
    color: #424242;
    border: 1px solid #e0e0e0;
}

.btn-secondary:hover {
    background-color: #eeeeee;
}

/* Footer styles */
.cookie-consent-footer {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #757575;
}

.cookie-consent-footer a {
    color: #6200EE;
    text-decoration: none;
}

.cookie-consent-footer a:hover {
    text-decoration: underline;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

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

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.cookie-slider {
    background-color: #6200EE;
}

input:disabled+.cookie-slider {
    background-color: #7c4dff;
    opacity: 0.7;
}

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

input:focus+.cookie-slider {
    box-shadow: 0 0 0 2px rgba(98, 0, 238, 0.25);
}

/* Cookie Settings Button */
.cookie-settings-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    background-color: #6200EE;
    color: white;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9998;
    transition: all 0.2s;
    opacity: 0;
    animation: fadeIn 0.3s ease-out 0.5s forwards;
}

.cookie-settings-button:hover {
    background-color: #7c4dff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cookie-settings-button:focus {
    outline: 2px solid #6200EE;
    outline-offset: 2px;
}

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

/* Close button styles */
.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #757575;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #424242;
}

/* Custom feedback message */
#cookie-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #6200EE;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: opacity 0.3s;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-consent-banner {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        transform: none;
        border-radius: 0;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        animation: slideUp 0.3s ease-out forwards;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .cookie-consent-container {
        padding: 16px;
    }

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

    .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .cookie-settings-button {
        bottom: 10px;
        padding-bottom: 11px;
        font-size: 0.8rem;
    }
}

/* Accessibility focus styles */
:focus {
    outline: 2px solid #6200EE;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .cookie-slider {
        border: 1px solid ButtonText;
    }

    .btn-primary {
        background-color: Highlight;
        color: HighlightText;
    }

    .cookie-settings-button {
        background-color: Highlight;
        color: HighlightText;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .cookie-consent-banner,
    .cookie-settings-button,
    .btn,
    .cookie-slider,
    .cookie-slider:before,
    #cookie-feedback {
        animation: none;
        transition: none;
    }
}