/* Cookie Consent System Styles */
/* Professional CSS following best practices */

/* Cookie Consent Banner - Minimal Top Bar Style */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.5rem 1rem;
    z-index: 10000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-content {
    max-width: 75rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
}

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

.cookie-consent-text h4 {
    display: none; /* Remove "We use cookies" text */
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.2;
    color: #6b7280;
    opacity: 0.8;
}

.cookie-consent-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
}

.cookie-consent-buttons button {
    padding: 0.44rem 0.825rem; /* 10% larger padding */
    border: 1px solid #e5e7eb;
    border-radius: 50px; /* Fully circular like site buttons */
    cursor: pointer;
    font-weight: 500;
    font-size: 0.825rem; /* 10% larger font */
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
    background: white;
    color: #374151;
}

.cookie-consent-buttons .btn-accept-all {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    min-width: 132px; /* 10% larger minimum width */
}

.cookie-consent-buttons .btn-accept-all:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #663399 100%);
    transform: scale(1.01);
}

.cookie-consent-buttons .btn-essential {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-consent-buttons .btn-essential:hover {
    background: #f9fafb;
    color: #374151;
}

.cookie-consent-buttons .btn-manage {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.cookie-consent-buttons .btn-manage:hover {
    background: #f9fafb;
    color: #374151;
}

/* Cookie Settings Button (floating) */
.cookie-settings-btn {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 9999;
}

.cookie-settings-btn button {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 3.125rem;
    height: 3.125rem;
    cursor: pointer;
    font-size: 1.125rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.cookie-settings-btn button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    background: #4f46e5;
}

.cookie-settings-btn button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Cookie Preferences Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.cookie-modal-content {
    background: white;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 37.5rem;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #374151;
    background: #f3f4f6;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.cookie-category h4 {
    margin: 0;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 600;
}

.cookie-category p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Cookie Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 3.125rem;
    height: 1.5rem;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s ease;
    border-radius: 1.5rem;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.125rem;
    width: 1.125rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background-color: white;
    transition: 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .slider {
    background-color: #6366f1;
}

input:disabled + .slider {
    background-color: #10b981;
    cursor: not-allowed;
    opacity: 0.7;
}

input:checked + .slider:before {
    transform: translateX(1.625rem);
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #f9fafb;
    border-radius: 0 0 0.75rem 0.75rem;
}

.cookie-modal-footer button {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.cookie-modal-footer .btn-save {
    background: #10b981;
    color: white;
}

.cookie-modal-footer .btn-save:hover {
    background: #059669;
    transform: translateY(-1px);
}

.cookie-modal-footer .btn-accept {
    background: #6366f1;
    color: white;
}

.cookie-modal-footer .btn-accept:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 0.5rem 0.75rem; /* Slightly more padding for vertical layout */
    }
    
    .cookie-consent-content {
        flex-direction: column; /* Stack text above buttons */
        align-items: center;
        gap: 0.5rem;
        min-height: auto; /* Let content determine height */
        text-align: center;
    }
    
    .cookie-consent-text {
        order: 2; /* Text below buttons */
    }
    
    .cookie-consent-text p {
        font-size: 0.7rem; /* Smaller text on mobile */
        opacity: 0.7; /* Even more subtle */
        margin: 0;
    }
    
    .cookie-consent-buttons {
        order: 1; /* Buttons above text */
        flex-direction: row; /* Keep buttons in one line */
        gap: 0.375rem; /* Tighter gap */
        flex-shrink: 0;
        justify-content: center;
    }
    
    .cookie-consent-buttons button {
        padding: 0.33rem 0.66rem; /* 10% larger mobile buttons */
        font-size: 0.77rem; /* 10% larger mobile text */
        min-width: auto;
        border-radius: 50px; /* Keep circular on mobile */
    }
    
    .cookie-consent-buttons .btn-accept-all {
        min-width: 88px; /* 10% larger mobile accept button */
    }
}

/* Ultra-compact for very small mobile screens */
@media (max-width: 480px) {
    .cookie-consent {
        padding: 0.25rem 0.5rem; /* Ultra-compact */
    }
    
    .cookie-consent-content {
        gap: 0.5rem;
        min-height: 36px;
    }
    
    .cookie-consent-text p {
        font-size: 0.65rem; /* Ultra-small text */
        line-height: 1.1;
    }
    
    .cookie-consent-buttons {
        gap: 0.25rem;
    }
    
    .cookie-consent-buttons button {
        padding: 0.275rem 0.44rem; /* 10% larger ultra-mobile buttons */
        font-size: 0.715rem; /* 10% larger ultra-mobile text */
        border-radius: 50px; /* Keep circular on ultra-small mobile */
    }
    
    .cookie-consent-buttons .btn-accept-all {
        min-width: 77px; /* 10% larger ultra-mobile accept button */
    }
}
    
    .cookie-modal-content {
        width: 95%;
        margin: 0.625rem;
        max-height: 90vh;
    }
    
    .cookie-modal-header {
        padding: 1rem;
    }
    
    .cookie-modal-body {
        padding: 1rem;
    }
    
    .cookie-modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .cookie-modal-footer button {
        width: 100%;
    }
    
    .cookie-settings-btn {
        bottom: 1rem;
        right: 1rem;
    }
    
    .cookie-settings-btn button {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent {
        border-top-width: 4px;
    }
    
    .cookie-consent-buttons button {
        border: 2px solid currentColor;
    }
    
    .slider {
        border: 2px solid #374151;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-buttons button,
    .cookie-settings-btn button,
    .cookie-modal-footer button,
    .slider,
    .slider:before {
        transition: none;
    }
    
    .cookie-settings-btn button:hover {
        transform: none;
    }
} 