/*
 * Consent Manager CSS
 * Styles for GDPR consent overlays and privacy management
 */

/* =============================================================================
   Consent Overlay Base
   ============================================================================= */

.geo-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.geo-consent-overlay.show {
    opacity: 1;
    visibility: visible;
}

.geo-consent-overlay.priority-critical {
    z-index: 99999;
}

.geo-consent-overlay.priority-consent {
    z-index: 99998;
}

.geo-consent-overlay.priority-location {
    z-index: 99997;
}

.geo-consent-overlay.priority-notification {
    z-index: 99996;
}

.geo-consent-overlay.priority-marketing {
    z-index: 99995;
}

/* =============================================================================
   Consent Modal
   ============================================================================= */

.geo-consent-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    direction: rtl;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============================================================================
   Modal Header
   ============================================================================= */

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

.geo-consent-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.geo-consent-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    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;
}

.geo-consent-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* =============================================================================
   Modal Content
   ============================================================================= */

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

.geo-consent-content p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    color: #555;
}

/* =============================================================================
   Consent Options
   ============================================================================= */

.geo-consent-options {
    margin-bottom: 24px;
}

.geo-consent-option {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.geo-consent-option:hover {
    background: #f1f3f4;
    border-color: #dee2e6;
}

.geo-consent-option label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.geo-consent-option input[type="checkbox"] {
    margin-left: 12px;
    margin-top: 2px;
    transform: scale(1.2);
}

.geo-consent-option input[type="checkbox"]:disabled {
    opacity: 0.6;
}

.geo-consent-label {
    font-weight: 600;
    color: #333;
    flex: 1;
}

.geo-consent-required {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 8px;
}

.geo-consent-description {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-right: 32px;
}

/* =============================================================================
   Privacy Link
   ============================================================================= */

.geo-consent-privacy-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.geo-consent-privacy-link a {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.geo-consent-privacy-link a:hover {
    text-decoration: underline;
}

/* =============================================================================
   Modal Actions
   ============================================================================= */

.geo-consent-actions {
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.geo-consent-actions .button {
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    flex: 1;
}

.geo-consent-accept-all {
    background: #0073aa;
    color: white;
}

.geo-consent-accept-all:hover {
    background: #005177;
    color: white;
}

.geo-consent-accept-selected {
    background: #f0f0f1;
    color: #333;
    border: 1px solid #c3c4c7;
}

.geo-consent-accept-selected:hover {
    background: #e0e0e1;
    color: #333;
}

.geo-consent-reject-all {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.geo-consent-reject-all:hover {
    background: #f5f5f5;
    color: #333;
}

/* =============================================================================
   Location Consent Modal
   ============================================================================= */

.geo-location-consent {
    max-width: 480px;
    text-align: center;
}

.geo-location-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.geo-location-consent .geo-consent-content ul {
    text-align: right;
    margin: 20px 0;
    padding-right: 20px;
}

.geo-location-consent .geo-consent-content li {
    margin-bottom: 8px;
    color: #555;
}

.geo-location-privacy {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 20px;
}

.geo-location-privacy small {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.geo-location-allow {
    background: #4caf50;
    color: white;
}

.geo-location-allow:hover {
    background: #45a049;
    color: white;
}

.geo-location-deny {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
}

.geo-location-deny:hover {
    background: #f5f5f5;
    color: #333;
}

/* =============================================================================
   Consent Banner (Alternative Layout)
   ============================================================================= */

.geo-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #0073aa;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 99990;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    direction: rtl;
}

.geo-consent-banner.show {
    transform: translateY(0);
}

.geo-consent-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.geo-consent-banner-text {
    flex: 1;
}

.geo-consent-banner-text p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.geo-consent-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.geo-consent-banner .button {
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* =============================================================================
   Loading States
   ============================================================================= */

.geo-consent-loading {
    opacity: 0.6;
    pointer-events: none;
}

.geo-consent-loading .geo-consent-actions .button::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "..."; }
    40% { content: ""; }
    60% { content: "."; }
    80% { content: ".."; }
}

/* =============================================================================
   Success/Error Messages
   ============================================================================= */

.geo-consent-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.geo-consent-message.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.geo-consent-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* =============================================================================
   Responsive Design
   ============================================================================= */

@media (max-width: 768px) {
    .geo-consent-modal {
        width: 95%;
        max-height: 95vh;
        margin: 20px;
        border-radius: 8px;
    }
    
    .geo-consent-header,
    .geo-consent-content,
    .geo-consent-actions {
        padding: 16px;
    }
    
    .geo-consent-actions {
        flex-direction: column;
    }
    
    .geo-consent-actions .button {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .geo-consent-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .geo-consent-banner-actions {
        justify-content: center;
    }
    
    .geo-location-consent {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .geo-consent-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .geo-consent-header {
        padding: 12px 16px;
    }
    
    .geo-consent-header h3 {
        font-size: 18px;
    }
    
    .geo-consent-content {
        padding: 16px;
    }
    
    .geo-consent-option {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .geo-consent-actions {
        padding: 16px;
    }
    
    .geo-consent-banner {
        padding: 12px;
    }
    
    .geo-consent-banner .button {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* =============================================================================
   Dark Mode Support
   ============================================================================= */

@media (prefers-color-scheme: dark) {
    .geo-consent-modal {
        background: #2c2c2c;
        color: #fff;
    }
    
    .geo-consent-header {
        border-bottom-color: #444;
    }
    
    .geo-consent-header h3 {
        color: #fff;
    }
    
    .geo-consent-close {
        color: #ccc;
    }
    
    .geo-consent-close:hover {
        background: #444;
        color: #fff;
    }
    
    .geo-consent-content p {
        color: #ccc;
    }
    
    .geo-consent-option {
        background: #333;
        border-color: #444;
    }
    
    .geo-consent-option:hover {
        background: #3a3a3a;
        border-color: #555;
    }
    
    .geo-consent-label {
        color: #fff;
    }
    
    .geo-consent-description {
        color: #bbb;
    }
    
    .geo-consent-privacy-link {
        border-top-color: #444;
    }
    
    .geo-consent-actions {
        border-top-color: #444;
    }
    
    .geo-consent-accept-selected {
        background: #444;
        color: #fff;
        border-color: #666;
    }
    
    .geo-consent-accept-selected:hover {
        background: #555;
    }
    
    .geo-consent-reject-all {
        border-color: #666;
        color: #ccc;
    }
    
    .geo-consent-reject-all:hover {
        background: #444;
        color: #fff;
    }
    
    .geo-location-privacy {
        background: #333;
        border-color: #444;
    }
    
    .geo-location-privacy small {
        color: #bbb;
    }
}

/* =============================================================================
   Accessibility
   ============================================================================= */

.geo-consent-overlay:focus-within {
    outline: none;
}

.geo-consent-modal:focus {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

.geo-consent-actions .button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.geo-consent-option input[type="checkbox"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .geo-consent-modal {
        border: 2px solid #000;
    }
    
    .geo-consent-option {
        border: 2px solid #333;
    }
    
    .geo-consent-actions .button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .geo-consent-overlay,
    .geo-consent-modal,
    .geo-consent-banner,
    .geo-consent-close,
    .geo-consent-option,
    .geo-consent-actions .button {
        transition: none;
    }
    
    @keyframes modalSlideIn {
        from, to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}