/* RTL Support for Arabic */
.rtl-lang {
    direction: rtl !important;
}

.rtl-lang .container,
.rtl-lang .mx-auto {
    direction: rtl;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-current:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
}

.lang-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.lang-option:hover {
    background: #f0fdf4;
}

.lang-option.active {
    background: #d1fae5;
    font-weight: 700;
}

.lang-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-top: 3px solid #10b981;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-icon {
    color: #10b981;
    flex-shrink: 0;
}

.cookie-icon svg {
    width: 48px;
    height: 48px;
}

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

.cookie-text h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.cookie-text p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-buttons button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.btn-accept:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-decline {
    background: #ef4444;
    color: white;
}

.btn-decline:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-customize {
    background: white;
    color: #1f2937;
    border-color: #d1d5db;
}

.btn-customize:hover {
    border-color: #10b981;
    color: #10b981;
    transform: translateY(-2px);
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cookie-modal.show {
    opacity: 1;
    pointer-events: all;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.cookie-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.cookie-modal-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f2937;
    margin: 0 0 1.5rem 0;
}

.cookie-category {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.cookie-category p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: 0.3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

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

.switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch.disabled .slider {
    cursor: not-allowed;
}

.cookie-modal-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn-save {
    flex: 1;
    padding: 1rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-save:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-buttons button {
        width: 100%;
    }

    .cookie-modal-content {
        padding: 1.5rem;
    }

    .cookie-category-header {
        flex-direction: column;
    }
}
