/* Scoped language component: in-flow desktop actions and mobile drawer. */
.royal-language {
  display: inline-flex;
  flex: 0 0 auto;
  width: max-content;
  align-items: center;
  gap: 0;
  padding: 0;
  color: #fff4d7;
  font: 600 11px/1.2 Inter, sans-serif;
  letter-spacing: .04em;
}
.royal-language a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 7px;
  color: #d8cbb9;
  text-decoration: none;
}
.royal-language a + a {
  background: linear-gradient(rgba(215, 173, 74, .35), rgba(215, 173, 74, .35)) left center / 1px 14px no-repeat;
}
.royal-language a[aria-current="page"] { color: #e4bf65; }
.royal-language a[aria-current="page"] span {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.royal-language a:hover { color: #fff4d7; }
.royal-language a:focus-visible { outline: 2px solid #d7ad4a; outline-offset: 2px; border-radius: 2px; }
.royal-language .royal-language__flag {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 1px;
}
.mobile-nav__content > .royal-language { margin: 4px 0 20px 14px; }
.mobile-nav__content > .royal-language a {
  min-height: 36px;
  padding: 0 10px !important;
  font: inherit !important;
  color: #d8cbb9 !important;
  justify-content: center;
}
.mobile-nav__content > .royal-language a[aria-current="page"] { color: #e4bf65 !important; }
@media (max-width: 1199px) {
  .main-header__right > .royal-language { display: none; }
}
@media (min-width: 1200px) {
  /* Remove the old button's extra margin; the action group already supplies a gap. */
  .main-header__right:has(> .royal-language) > .main-header__btn { margin-left: 0; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  /* Horizontal space only: preserve the existing header and hero heights. */
  .main-header__right:has(> .royal-language) > .royal-header-phone,
  .main-header__right:has(> .royal-language) > .main-header__btn {
    width: 155px !important;
    min-width: 155px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* Show only the alternate language; retain the approved header allocation. */
@media (min-width: 1200px) {
  /* Intrinsic sizing follows the loaded font; the sole link fills both tracks. */
  .royal-language { display: inline-grid; grid-template-columns: auto auto; }
  .royal-language::before,
  .royal-language::after {
    visibility: hidden;
    pointer-events: none;
    padding-inline: 18.5px;
    grid-row: 1;
  }
  .royal-language::before { content: "ES" / ""; grid-column: 1; }
  .royal-language::after { content: "EN" / ""; grid-column: 2; }
  .royal-language a:not([aria-current="page"]) { grid-area: 1 / 1 / 2 / 3; }
}
.royal-language a[aria-current="page"] { display: none !important; }
.main-header .royal-language a:not([aria-current="page"]) {
  width: 100% !important;
  box-sizing: border-box;
  background: none;
}
@media (max-width: 1199px) {
  .main-header .royal-language { width: 64px; }
  .main-header .royal-language a span { display: inline !important; }
}
@media (max-width: 380px) {
  .main-header .royal-language { width: 56px; }
}
