/* GDPR Cookie Consent Styles */

.cookie-consent-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-consent-dialog.show {
    opacity: 1;
    visibility: visible;
}

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

.cookie-consent-content {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.cookie-consent-dialog:not(.show) .cookie-consent-content {
    transform: translateX(-50%) translateY(100%);
}

.cookie-consent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 16px;
}

.cookie-consent-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cookie-close-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.cookie-consent-body {
    padding: 20px 24px;
}

.cookie-main-text {
    margin: 0 0 20px 0;
    color: #555;
    line-height: 1.5;
    font-size: 0.95rem;
}

.cookie-categories {
    margin-bottom: 16px;
}

.cookie-category {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.cookie-category:hover {
    border-color: #ccc;
}

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.cookie-category-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

/* Toggle Switch Styles */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.cookie-toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

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

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-slider {
    background-color: #2196f3;
}

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

.cookie-toggle input:disabled + .cookie-slider {
    background-color: #4caf50;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle input:disabled {
    cursor: not-allowed;
}

.cookie-links {
    margin-top: 16px;
    text-align: center;
    font-size: 0.875rem;
}

.cookie-policy-link,
.cookie-settings-link {
    color: #2196f3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cookie-policy-link:hover,
.cookie-settings-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

.cookie-consent-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.cookie-btn-primary {
    background-color: #2196f3;
    color: white;
}

.cookie-btn-primary:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.cookie-btn-accept {
    background-color: #4caf50;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.cookie-btn-secondary {
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.cookie-btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: none;
        border-radius: 0;
        max-height: 85vh;
    }
    
    .cookie-consent-dialog:not(.show) .cookie-consent-content {
        transform: translateY(100%);
    }
    
    .cookie-consent-header {
        padding: 16px 20px 0;
    }
    
    .cookie-consent-body {
        padding: 16px 20px;
    }
    
    .cookie-consent-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    .cookie-category {
        padding: 10px;
    }
    
    .cookie-category-header {
        gap: 10px;
    }
    
    .cookie-main-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cookie-consent-header h3 {
        font-size: 1.1rem;
    }
    
    .cookie-consent-body {
        padding: 14px 16px;
    }
    
    .cookie-consent-footer {
        padding: 10px 16px 16px;
    }
    
    .cookie-main-text {
        font-size: 0.85rem;
    }
    
    .cookie-category-info h4 {
        font-size: 0.95rem;
    }
    
    .cookie-category-info p {
        font-size: 0.8rem;
    }
}

/* Desktop positioning (centered modal) */
@media (min-width: 769px) {
    .cookie-consent-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        border-radius: 12px;
        max-height: 80vh;
    }
    
    .cookie-consent-dialog:not(.show) .cookie-consent-content {
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    .cookie-consent-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-dialog,
    .cookie-consent-content,
    .cookie-slider,
    .cookie-slider:before,
    .cookie-btn {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-content {
        border: 2px solid #000;
    }
    
    .cookie-category {
        border-color: #000;
    }
    
    .cookie-btn {
        border: 2px solid #000;
    }
}
