/**
 * Privacy & Cookie Consent Banner Styles
 */

/* Privacy Banner Base Styles */
.privacy-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-top: 3px solid #667eea;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
    text-align: right;
}

.privacy-banner.visible {
    transform: translateY(0);
}

.privacy-banner.hiding {
    transform: translateY(100%);
}

/* Banner Content */
.privacy-banner-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.privacy-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.privacy-text {
    flex: 1;
    min-width: 300px;
}

.privacy-text h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.privacy-text p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Privacy Actions */
.privacy-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.privacy-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.privacy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.privacy-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.privacy-btn.primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.privacy-btn.secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.privacy-btn.secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.privacy-btn.minimal {
    background: transparent;
    color: #6c757d;
    text-decoration: underline;
    padding: 8px 12px;
}

.privacy-btn.minimal:hover {
    color: #495057;
    transform: none;
    box-shadow: none;
}

/* Privacy Settings Panel */
.privacy-settings {
    border-top: 1px solid #dee2e6;
    padding: 20px;
    background: #f8f9fa;
    animation: slideDown 0.3s ease-out;
}

.privacy-settings h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Privacy Options */
.privacy-option {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.privacy-option-info {
    flex: 1;
}

.privacy-option-info strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.privacy-option-info p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Custom Toggle Switch */
.privacy-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.privacy-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

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

input:checked + .privacy-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:focus + .privacy-slider {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

input:checked + .privacy-slider:before {
    transform: translateX(26px);
}

input:disabled + .privacy-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Privacy Modal */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.privacy-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s ease-out;
    direction: rtl;
    text-align: right;
}

.privacy-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.privacy-modal-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.privacy-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.privacy-modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.privacy-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.privacy-modal-body h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.privacy-modal-body h4 {
    color: #495057;
    font-size: 1rem;
    margin: 15px 0 8px 0;
}

.privacy-modal-body ul {
    margin: 10px 0;
    padding-right: 20px;
}

.privacy-modal-body li {
    margin: 5px 0;
    line-height: 1.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .privacy-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 15px;
    }
    
    .privacy-text {
        min-width: auto;
    }
    
    .privacy-text h3 {
        font-size: 1.1rem;
    }
    
    .privacy-text p {
        font-size: 0.9rem;
    }
    
    .privacy-actions {
        justify-content: center;
        width: 100%;
    }
    
    .privacy-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .privacy-option {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .privacy-switch {
        align-self: center;
    }
    
    .privacy-modal {
        padding: 10px;
    }
    
    .privacy-modal-content {
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    .privacy-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .privacy-btn {
        width: 100%;
        margin: 2px 0;
    }
    
    .privacy-banner-content {
        padding: 12px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .privacy-banner {
        border-top-width: 4px;
        background: white;
        backdrop-filter: none;
    }
    
    .privacy-btn.primary {
        background: #000;
    }
    
    .privacy-btn.secondary {
        border-width: 2px;
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .privacy-banner,
    .privacy-btn,
    .privacy-slider,
    .privacy-modal,
    .privacy-modal-content {
        transition: none;
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .privacy-banner {
        background: rgba(33, 37, 41, 0.98);
        border-top-color: #667eea;
    }
    
    .privacy-text h3 {
        color: #f8f9fa;
    }
    
    .privacy-text p {
        color: #adb5bd;
    }
    
    .privacy-settings {
        background: #212529;
        border-top-color: #495057;
    }
    
    .privacy-settings h4 {
        color: #f8f9fa;
    }
    
    .privacy-option {
        background: #343a40;
        border-color: #495057;
    }
    
    .privacy-option-info strong {
        color: #f8f9fa;
    }
    
    .privacy-option-info p {
        color: #adb5bd;
    }
    
    .privacy-modal-content {
        background: #212529;
        color: #f8f9fa;
    }
    
    .privacy-modal-header {
        background: #343a40;
        border-bottom-color: #495057;
    }
    
    .privacy-modal-header h2 {
        color: #f8f9fa;
    }
    
    .privacy-modal-close {
        color: #adb5bd;
    }
    
    .privacy-modal-close:hover {
        background: #495057;
        color: #f8f9fa;
    }
}

/* Print styles */
@media print {
    .privacy-banner,
    .privacy-modal {
        display: none !important;
    }
}
