
/* ============================================
   LANGUAGE PICKER MODAL (First Run)
   ============================================ */
.language-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-picker-content {
  background: white;
  padding: 32px;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  text-align: center;
}

.language-picker-content h2 {
  margin: 0 0 16px 0;
  font-size: 24px;
}

.language-picker-content p {
  margin: 0 0 24px 0;
  font-size: 16px;
  color: #666;
}

.language-picker-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.language-picker-buttons button {
  flex: 1;
}

.language-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.lang-option {
  padding: 12px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.lang-option:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

@media (max-width: 768px) {
  .language-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RTL SUPPORT
   ============================================ */
html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body {
  text-align: right;
}

/* RTL FAB positioning */
html[dir="rtl"] .tray-fab {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .tray-fab--refine {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .tray-fab--route {
  left: auto;
  right: 20px;
}

/* RTL Trays */
html[dir="rtl"] .ce-tray {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

html[dir="rtl"] .ce-tray--open {
  transform: translateX(0);
}

/* RTL Chevrons */
html[dir="rtl"] .chevron-right::before {
  content: "‹";
}

html[dir="rtl"] .chevron-left::before {
  content: "›";
}

/* RTL Padding/Margins */
html[dir="rtl"] .setting-item {
  padding: 12px 12px 12px 0;
}

html[dir="rtl"] .profile-checkbox {
  flex-direction: row-reverse;
}

/* ============================================
   LANGUAGE POPOVER (Header)
   ============================================ */
.language-popover {
  position: fixed;
  top: 60px;
  right: 120px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 10005;
  min-width: 200px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s;
}

.language-popover--open {
  opacity: 1;
  transform: translateY(0);
}

.language-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.language-popover-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.language-popover-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: white;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.language-option:hover {
  background: #f5f5f5;
}

.language-option--active {
  background: #e3f2fd;
  font-weight: 600;
}

.language-flag {
  font-size: 20px;
}

.language-name {
  flex: 1;
  font-size: 14px;
}

.language-check {
  color: #007bff;
  font-weight: bold;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .language-popover {
    right: 10px;
    left: 10px;
    top: 60px;
  }
}

