/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Language Selector Popup */
.language-selector-container {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.language-selector-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #667eea;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.language-selector-toggle:hover {
  background: white;
  border-color: #667eea;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.language-selector-popup {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-width: 250px;
  animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.language-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.language-selector-title {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.language-selector-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.language-selector-close:hover {
  color: #333;
}

.language-options {
  padding: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.2s ease;
  position: relative;
}

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

.language-option.active {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-weight: 500;
}

.language-flag {
  width: 32px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
  margin-right: 12px;
}

html[dir="rtl"] .language-flag {
  margin-right: 0;
  margin-left: 12px;
}

.language-name {
  flex: 1;
}

.language-check {
  color: #667eea;
  margin-left: auto;
}

html[dir="rtl"] .language-check {
  margin-left: 0;
  margin-right: auto;
}

/* Mobile responsiveness for language selector */
@media (max-width: 768px) {
  .language-selector-container {
    bottom: 20px;
  }
  
  .language-selector-popup {
    width: 90vw;
    max-width: 350px;
  }
}

/* Comprehensive RTL Support */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .welcome-container {
  direction: rtl;
}

html[dir="rtl"] .welcome-content {
  direction: rtl;
  text-align: center;
}

html[dir="rtl"] .welcome-content h1,
html[dir="rtl"] .welcome-content .subtitle,
html[dir="rtl"] .welcome-content .description {
  direction: rtl;
  text-align: center;
}

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

html[dir="rtl"] .cta-button {
  direction: rtl;
}

/* Ensure animations work correctly in RTL */
html[dir="rtl"] @keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
