/* Translation dropdown styling */
.language-button {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 32px;
  border-radius: 6px;
  background-color: rgba(142, 157, 203, 0.95);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  padding: 0;
  overflow: hidden;
}

.language-button:hover {
  background-color: rgba(142, 157, 203, 1);
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.language-button:active {
  transform: scale(0.95);
}

.language-button .flag-img {
  width: 30px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

/* Language dropdown menu */
.language-dropdown {
  position: fixed;
  top: 60px;
  right: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
  z-index: 999;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  flex-direction: column;
  transform: translateY(-10px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  max-width: 180px;
  min-width: 130px;
  transform-origin: top right;
}

.language-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  display: flex;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateX(10px);
}

.language-dropdown.show .language-option {
  opacity: 1;
  transform: translateX(0);
  transition: background-color 0.2s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Staggered animation for options */
.language-dropdown.show .language-option:nth-child(1) {
  transition-delay: 0.05s;
}

.language-dropdown.show .language-option:nth-child(2) {
  transition-delay: 0.1s;
}

.language-dropdown.show .language-option:nth-child(3) {
  transition-delay: 0.15s;
}

.language-dropdown.show .language-option:nth-child(4) {
  transition-delay: 0.2s;
}

.language-dropdown.show .language-option:nth-child(5) {
  transition-delay: 0.25s;
}

.language-option:hover {
  background-color: #f0f0f0;
  transform: translateX(5px);
}

.language-option.active {
  background-color: #e6eeff;
}

.country-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  margin-right: 10px;
  text-align: center;
  overflow: hidden;
}

.country-code .flag-img {
  width: 30px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
}

.language-name {
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}

/* RTL (Right-to-Left) layout adjustments for Arabic */
[dir="rtl"] .profile-image {
  order: 2;
}

[dir="rtl"] .profile-text {
  order: 1;
  padding-left: 0;
  padding-right: 1.4rem;
}

[dir="rtl"] .social-icons {
  direction: ltr; /* Keep the social icons in the same order */
}

[dir="rtl"] .nav-buttons {
  direction: rtl;
}

/* Adjust the dropdown position and animation origin for Arabic */
[dir="rtl"] .language-button,
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 20px;
}

[dir="rtl"] .language-dropdown {
  transform-origin: top left;
}

[dir="rtl"] .language-option {
  transform: translateX(-10px);
}

[dir="rtl"] .language-dropdown.show .language-option {
  transform: translateX(0);
}

[dir="rtl"] .language-option:hover {
  transform: translateX(-5px);
}

/* Adjust the dropdown position for Arabic */
[dir="rtl"] .language-button,
[dir="rtl"] .language-dropdown {
  right: auto;
  left: 20px;
} 