/**
 * Cookie Consent Banner Styles
 * Modern, accessible, and responsive design
 */

#cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.cookie-consent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-consent-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.cookie-consent-content {
    padding: 32px;
}

.cookie-consent-content h2 {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-consent-content > p {
    margin: 0 0 24px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a4a4a;
}

.cookie-consent-details {
    margin-bottom: 24px;
}

.cookie-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.cookie-category h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.cookie-category p {
    margin: 0 0 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.3s;
    margin-right: 12px;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: #286158;
}

.cookie-toggle input[type="checkbox"]:checked + .toggle-slider::after {
    transform: translateX(24px);
}

.cookie-toggle input[type="checkbox"]:disabled + .toggle-slider {
    background: #286158;
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-label {
    font-size: 14px;
    color: #4a4a4a;
    font-weight: 500;
}

.cookie-consent-info {
    background: #e8f5f3;
    border-left: 4px solid #286158;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
}

.cookie-consent-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #2c5f57;
}

.cookie-consent-info p:last-child {
    margin-bottom: 0;
}

.cookie-consent-info strong {
    font-weight: 600;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cookie-consent-actions button {
    flex: 1;
    min-width: 140px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: #1f4d46;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 97, 88, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #286158;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-text {
    background: transparent;
    color: #666;
    flex: 0 0 auto;
    min-width: auto;
}

.btn-text:hover {
    color: #286158;
    text-decoration: underline;
}

.cookie-consent-footer {
    text-align: center;
    font-size: 13px;
    color: #999;
    margin: 0;
}

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

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

/* Responsive design */
@media (max-width: 640px) {
    .cookie-consent-modal {
        width: 95%;
        max-height: 95vh;
    }

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

    .cookie-consent-content h2 {
        font-size: 20px;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-consent-actions button {
        width: 100%;
        min-width: 0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-modal {
        animation: none;
    }
    
    .toggle-slider,
    .toggle-slider::after,
    .cookie-consent-actions button {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.cookie-consent-actions button:focus,
.cookie-toggle:focus-within {
    outline: 2px solid #286158;
    outline-offset: 2px;
}

/* Settings button (to reopen consent) */
.cookie-settings-trigger {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #286158;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.cookie-settings-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.cookie-settings-trigger:focus {
    outline: 2px solid #286158;
    outline-offset: 4px;
}
