/* AUTO TESTER - Cookie Consent Styles */

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #002b5c, #004481);
    color: white;
    border-radius: 15px;
    padding: 25px;
    z-index: 10000;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 43, 92, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-consent.show {
    bottom: 20px;
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 100%;
}

.cookie-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffd700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.cookie-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffd700;
}

.cookie-text p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-text a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cookie-text a:hover {
    text-decoration: underline;
    color: #fff;
}

.cookie-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.btn-cookie {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-cookie:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-accept {
    background: #ffd700;
    color: #002b5c;
    border-color: #ffd700;
}

.btn-accept:hover {
    background: #ffed4e;
    border-color: #ffed4e;
}

.btn-reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Cookie Settings Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: all 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #002b5c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-body {
    padding: 30px;
}

.cookie-category {
    margin-bottom: 30px;
}

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

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.category-header p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.3s;
    border-radius: 26px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #ffd700;
}

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

.toggle-switch input:disabled + label {
    background-color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px 30px;
    border-top: 1px solid #e2e8f0;
}

.btn-primary {
    background: #002b5c;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #003d7a;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent {
        left: 15px;
        right: 15px;
        bottom: -100%;
        padding: 20px;
    }
    
    .cookie-consent.show {
        bottom: 15px;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cookie-icon {
        align-self: center;
    }
    
    .cookie-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
        width: 100%;
    }
    
    .btn-cookie {
        flex: 1;
        min-width: 0;
        font-size: 0.85rem;
        padding: 10px 15px;
    }
    
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-header {
        padding: 20px 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        left: 10px;
        right: 10px;
        padding: 15px;
    }
    
    .cookie-consent.show {
        bottom: 10px;
    }
    
    .cookie-text h3 {
        font-size: 1.1rem;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
    }
    
    .cookie-actions {
        gap: 8px;
    }
    
    .btn-cookie {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .btn-cookie i {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #1e293b;
        color: white;
    }
    
    .modal-header {
        border-bottom-color: #334155;
    }
    
    .modal-header h2 {
        color: white;
    }
    
    .modal-close {
        color: #94a3b8;
    }
    
    .modal-close:hover {
        background: #334155;
        color: white;
    }
    
    .category-header h3 {
        color: white;
    }
    
    .category-header p {
        color: #94a3b8;
    }
    
    .modal-footer {
        border-top-color: #334155;
    }
    
    .btn-secondary {
        color: #94a3b8;
        border-color: #475569;
    }
    
    .btn-secondary:hover {
        background: #334155;
        border-color: #64748b;
        color: white;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .cookie-consent {
        border: 3px solid #ffd700;
    }
    
    .btn-cookie {
        border-width: 3px;
        font-weight: 700;
    }
    
    .modal-content {
        border: 3px solid #002b5c;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-content,
    .btn-cookie,
    .modal-overlay,
    .modal-content,
    .toggle-switch label,
    .toggle-switch label:before {
        transition: none;
    }
    
    .cookie-icon {
        animation: none;
    }
    
    .btn-cookie:hover {
        transform: none;
    }
    
    .modal-content {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.btn-cookie:focus,
.modal-close:focus,
.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.btn-cookie:focus:not(:focus-visible),
.modal-close:focus:not(:focus-visible),
.btn-primary:focus:not(:focus-visible),
.btn-secondary:focus:not(:focus-visible) {
    outline: none;
}

/* Print Styles */
@media print {
    .cookie-consent,
    .modal-overlay {
        display: none !important;
    }
}

/* RTL Support */
html[dir="rtl"] .cookie-content {
    direction: rtl;
}

html[dir="rtl"] .modal-header {
    direction: rtl;
}

html[dir="rtl"] .modal-footer {
    direction: rtl;
}

html[dir="rtl"] .category-header {
    direction: rtl;
}

html[dir="rtl"] .toggle-switch label:before {
    left: auto;
    right: 3px;
}

html[dir="rtl"] .toggle-switch input:checked + label:before {
    transform: translateX(-24px);
}
