/* Language Modal & Switcher Styles */

.lang-trigger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Modal Overlay */
.lang-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.lang-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Content */
.lang-modal {
    background: white;
    width: 90%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid #e2e8f0;
}

.lang-modal-overlay.active .lang-modal {
    transform: scale(1);
}

/* Modal Header */
.lang-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lang-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.lang-search-wrapper {
    padding: 0 1.5rem 1rem 1.5rem;
    margin-top: -0.5rem;
}

.lang-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.lang-search-input:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.lang-search-icon {
    position: absolute;
    left: 2.25rem;
    top: 4.75rem;
    /* Adjust based on header height */
    color: #94a3b8;
    pointer-events: none;
}

/* Language List */
.lang-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.lang-item:hover {
    background: #f1f5f9;
}

.lang-item.selected {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.lang-item.selected .lang-name {
    color: #2563eb;
    font-weight: 600;
}

.lang-flag {
    width: 28px;
    height: 20px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-info {
    flex: 1;
}

.lang-name {
    display: block;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 500;
}

.lang-native {
    display: block;
    color: #64748b;
    font-size: 0.8rem;
}

.lang-check {
    color: #2563eb;
    font-size: 1rem;
    opacity: 0;
}

.lang-item.selected .lang-check {
    opacity: 1;
}

/* Close Button */
.lang-close-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.25rem;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.lang-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Adjustments for Dashboard specific styling if needed */
.dashboard-body .lang-trigger-btn {
    background: white;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.dashboard-body .lang-trigger-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}