/**
 * Language Selector Styles
 * Shared across all pages
 */

/* Language Button */
.lang-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
    padding: 0;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-color: #3b82f6;
}

.lang-btn svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
    fill: none;
}

.lang-btn img.lang-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Language Dialog Overlay */
.lang-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Language Dialog */
.lang-dialog {
    background: white;
    border-radius: 24px;
    max-width: 480px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.lang-dialog-overlay.show .lang-dialog {
    transform: scale(1) translateY(0);
}

/* Dialog Header */
.lang-dialog-header {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.lang-dialog-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Close Button */
.lang-dialog-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.lang-dialog-close:hover {
    background: white;
    transform: scale(1.1);
}

.lang-dialog-close svg {
    width: 20px;
    height: 20px;
    stroke: #64748b;
}

/* Dialog Content */
.lang-dialog-content {
    padding: 24px;
}

.lang-dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    text-align: center;
}

.lang-dialog-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
    text-align: center;
}

/* Language Grid */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Language Badge */
.lang-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-badge:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.lang-badge.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.lang-badge .flag {
    width: 32px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.lang-badge .lang-code {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* RTL Support */
[dir="rtl"] .lang-dialog-close {
    left: 12px;
    right: auto;
}

[dir="rtl"] .lang-grid {
    direction: ltr;
}
