/**
 * Privacy Banner & Cookie Consent Styles
 * Office Arcade - GDPR Compliant Design
 */

/* Privacy Banner Overlay */
#privacy-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#privacy-banner.show {
    opacity: 1;
    visibility: visible;
}

.privacy-banner-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.privacy-banner-content {
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
    transform: scale(0.9);
    animation: privacySlideIn 0.3s ease forwards;
}

@keyframes privacySlideIn {
    to {
        transform: scale(1);
    }
}

/* Privacy Header */
.privacy-header {
    text-align: center;
    margin-bottom: 24px;
}

.privacy-header h3 {
    margin: 0 0 12px 0;
    color: #3b82f6;
    font-size: 24px;
    font-weight: 600;
}

.privacy-header p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 14px;
}

/* Privacy Categories */
.privacy-categories {
    margin: 24px 0;
    space-y: 16px;
}

.privacy-category {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.privacy-category.required {
    background: #1e293b;
    border-color: #10b981;
}

.privacy-category:hover {
    border-color: #3b82f6;
}

.category-header {
    margin-bottom: 8px;
}

/* Privacy Checkbox Styling */
.privacy-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.privacy-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #334155;
    border: 2px solid #64748b;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.privacy-checkbox-label:hover input ~ .checkmark {
    border-color: #3b82f6;
    background-color: #1e40af;
}

.privacy-checkbox-label input:checked ~ .checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.privacy-checkbox-label input:disabled ~ .checkmark {
    background-color: #10b981;
    border-color: #10b981;
    opacity: 0.8;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.privacy-checkbox-label input:checked ~ .checkmark:after,
.privacy-checkbox-label input:disabled ~ .checkmark:after {
    display: block;
}

.required-badge {
    background: #10b981;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    text-transform: uppercase;
}

/* Category descriptions */
.category-description {
    margin: 8px 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.4;
    padding-left: 32px;
}

.cookie-list {
    padding-left: 32px;
    margin-top: 4px;
}

.cookie-list small {
    color: #64748b;
    font-size: 11px;
    font-family: 'Courier New', monospace;
}

/* Privacy Footer */
.privacy-footer {
    border-top: 1px solid #334155;
    padding-top: 20px;
    margin-top: 24px;
}

.privacy-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.privacy-links a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.privacy-links a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Privacy Action Buttons */
.privacy-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.privacy-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

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

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

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

.btn-accent {
    background: #10b981;
    color: white;
}

.btn-accent:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Privacy Modal Styles */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.privacy-modal-content {
    background: #1e293b;
    color: #f1f5f9;
    border-radius: 16px;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #334155;
    background: #0f172a;
}

.modal-header h3 {
    margin: 0;
    color: #3b82f6;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #f1f5f9;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    line-height: 1.6;
}

.modal-body h4 {
    color: #3b82f6;
    margin: 24px 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 4px;
    color: #cbd5e1;
}

.modal-body p {
    color: #cbd5e1;
    margin: 8px 0;
}

.modal-body a {
    color: #3b82f6;
    text-decoration: none;
}

.modal-body a:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* Cookie Details Table */
.cookie-category {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #334155;
}

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

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 13px;
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.cookie-table th {
    background: #0f172a;
    color: #3b82f6;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-table td {
    color: #cbd5e1;
}

.cookie-table code {
    background: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #10b981;
    font-size: 12px;
}

/* Privacy Settings Link */
.privacy-settings-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.privacy-settings-link:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    color: white;
}

/* Privacy Footer */
.privacy-footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid #334155;
    margin-top: 40px;
    background: #0f172a;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .privacy-banner-content {
        padding: 20px;
        margin: 10px;
        max-height: 95vh;
    }
    
    .privacy-header h3 {
        font-size: 20px;
    }
    
    .privacy-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .privacy-actions button {
        min-width: 0;
        width: 100%;
    }
    
    .privacy-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .privacy-modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
    
    .privacy-settings-link {
        /* On mobile, position in footer instead of floating */
        position: static;
        bottom: auto;
        right: auto;
        margin: 1rem auto 0 auto;
        display: block;
        width: fit-content;
        padding: 10px 16px;
        font-size: 12px;
        transform: none;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
    
    .privacy-settings-link:hover {
        transform: none;
    }
    
    .cookie-table {
        font-size: 11px;
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 8px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .privacy-banner-content,
    .privacy-modal-content {
        border: 2px solid #3b82f6;
    }
    
    .privacy-category {
        border: 2px solid #64748b;
    }
    
    .privacy-category.required {
        border-color: #10b981;
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    #privacy-banner,
    .privacy-banner-content,
    .privacy-actions button,
    .privacy-settings-link {
        transition: none;
        animation: none;
    }
    
    .privacy-actions button:hover,
    .privacy-settings-link:hover {
        transform: none;
    }
}