/* i18n_fluid.css */

/* Fluid layout basics to prevent layout break on text expansion */
.ams-fluid-container {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.ams-fluid-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  min-width: 160px;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
  text-align: center;
  line-height: 1.4;
  white-space: normal;
}

.ams-fluid-text {
  flex: 1 1 300px;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Specific language hacks for European languages to handle text expansion */
html[lang="en"] .ams-fluid-button,
html[lang="de"] .ams-fluid-button,
html[lang="fr"] .ams-fluid-button,
html[lang="es"] .ams-fluid-button,
html[lang="pt"] .ams-fluid-button,
html[lang="it"] .ams-fluid-button {
  font-size: 0.85em;
  word-break: normal;
}

html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3,
html[lang="de"] h1, html[lang="de"] h2, html[lang="de"] h3,
html[lang="fr"] h1, html[lang="fr"] h2, html[lang="fr"] h3,
html[lang="es"] h1, html[lang="es"] h2, html[lang="es"] h3,
html[lang="pt"] h1, html[lang="pt"] h2, html[lang="pt"] h3,
html[lang="it"] h1, html[lang="it"] h2, html[lang="it"] h3 {
  word-break: normal;
}

/* Custom Language Selector */
.custom-lang-selector {
  position: relative;
  font-family: 'Inter', sans-serif;
  user-select: none;
}
.lang-selector-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #6c5ce7;
  color: #b3a6ff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lang-selector-btn:hover {
  background: rgba(108, 92, 231, 0.1);
  border-color: #b4a6ff;
  color: #fff;
}
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 160px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}
.custom-lang-selector.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  padding: 10px 14px;
  color: #ccc;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.lang-option.active {
  background: rgba(226, 180, 255, 0.15);
  color: #e2b4ff;
  font-weight: 600;
}
