/*
 * Airdelay site chrome — clean baseline
 * Intended replacement for assets/site-chrome.css
 * Built for the current SiteChromeShortcode markup.
 */

.ad-site-header,
.ad-mobile-panel {
  --ad-navy: #1b1740;
  --ad-purple: #6338ee;
  --ad-purple-dark: #4e29c7;
  --ad-purple-soft: #f3efff;
  --ad-border: #ddd4fb;
  --ad-page: #f6f8ff;
  --ad-muted: #746b94;
  --ad-danger: #a44747;
}

.ad-site-header,
.ad-site-header *,
.ad-mobile-panel,
.ad-mobile-panel * {
  box-sizing: border-box;
}

.ad-site-header {
  position: relative;
  z-index: 999;
  width: 100%;
  background: var(--ad-page);
}

.ad-site-header a,
.ad-mobile-panel a {
  text-decoration: none;
}

.ad-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
}

/* Desktop header */
.ad-site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px;
}

.ad-site-header-logo,
.ad-mobile-panel-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.ad-site-header-logo img {
  display: block;
  width: 168px;
  height: auto;
}

.ad-site-header-nav {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-width: 0;
}

.ad-site-header-nav a {
  color: var(--ad-navy);
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.ad-site-header-nav a:hover,
.ad-site-header-nav a:focus-visible {
  color: var(--ad-purple);
}

.ad-site-header-actions,
.ad-site-header-desktop-account {
  display: flex;
  align-items: center;
}

.ad-site-header-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
}

.ad-site-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #2f258f;
  box-shadow: 0 8px 18px rgba(47, 37, 143, 0.22);
  color: #fff !important;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.ad-site-header-cta:hover,
.ad-site-header-cta:focus-visible {
  background: #251d78;
}

/* Shared dropdown positioning */
.ad-header-account,
.ad-header-language {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.ad-header-language-menu,
.ad-header-account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10020;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  border: 1px solid var(--ad-border);
  background: #fff;
  box-shadow: 0 18px 42px rgba(27, 23, 64, 0.12);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.ad-header-language.is-open .ad-header-language-menu,
.ad-header-language:focus-within .ad-header-language-menu,
.ad-header-account.is-open .ad-header-account-menu,
.ad-header-account:focus-within .ad-header-account-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
}

/* Language switcher */
.ad-header-language-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ad-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.ad-header-language-toggle:hover,
.ad-header-language-toggle:focus-visible {
  background: #fff;
  border-color: var(--ad-border);
}

.ad-header-language-flag {
  display: inline-block;
  flex: 0 0 24px;
  width: 24px;
  height: 18px;
  overflow: hidden;
  border-radius: 3px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(27, 23, 64, 0.14);
  font-size: 0;
}

.ad-flag-en {
  background-color: #012169;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3CclipPath id='a'%3E%3Cpath d='M0 0h60v40H0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23a)'%3E%3Cpath fill='%23012169' d='M0 0h60v40H0z'/%3E%3Cpath stroke='%23fff' stroke-width='8' d='m0 0 60 40M60 0 0 40'/%3E%3Cpath stroke='%23C8102E' stroke-width='4.8' d='m0 0 60 40M60 0 0 40'/%3E%3Cpath stroke='%23fff' stroke-width='13.333' d='M30 0v40M0 20h60'/%3E%3Cpath stroke='%23C8102E' stroke-width='8' d='M30 0v40M0 20h60'/%3E%3C/g%3E%3C/svg%3E");
}

.ad-flag-tr {
  background-color: #e30a17;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath fill='%23E30A17' d='M0 0h60v40H0z'/%3E%3Ccircle cx='25' cy='20' r='10' fill='%23fff'/%3E%3Ccircle cx='28.5' cy='20' r='8' fill='%23E30A17'/%3E%3Cpath fill='%23fff' d='m39 20-9.5 3.1 5.9-8v9.8l-5.9-8z'/%3E%3C/svg%3E");
}

.ad-flag-de {
  background-color: #ffce00;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 40'%3E%3Cpath fill='%23000' d='M0 0h60v13.333H0z'/%3E%3Cpath fill='%23DD0000' d='M0 13.333h60v13.334H0z'/%3E%3Cpath fill='%23FFCE00' d='M0 26.667h60V40H0z'/%3E%3C/svg%3E");
}

.ad-flag-default {
  background: var(--ad-purple-soft);
}

.ad-header-language-menu {
  min-width: 172px;
  padding: 8px;
  border-radius: 16px;
}

.ad-header-language-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 11px;
  border-radius: 11px;
  color: var(--ad-navy) !important;
  font-size: 14px;
  font-weight: 850;
}

.ad-header-language-option-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ad-header-language-menu a small {
  color: #7b8aa3;
  font-size: 12px;
}

.ad-header-language-menu a.is-active,
.ad-header-language-menu a:hover,
.ad-header-language-menu a:focus-visible {
  background: #f6f1ff;
  color: var(--ad-purple) !important;
}

.ad-header-language-mobile {
  display: none;
}

/* Desktop account trigger */
.ad-header-account-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 9px 0 6px;
  border: 1px solid var(--ad-border);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(27, 23, 64, 0.06);
  color: var(--ad-purple);
  cursor: pointer;
}

.ad-header-account-toggle:hover,
.ad-header-account-toggle:focus-visible {
  border-color: #c7b8f8;
  box-shadow: 0 9px 22px rgba(82, 48, 201, 0.14);
}

.ad-header-account-toggle:focus-visible {
  outline: 3px solid rgba(99, 56, 238, 0.2);
  outline-offset: 2px;
}

.ad-header-account-icon {
  display: inline-flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ad-purple-soft);
  color: var(--ad-purple);
  font-size: 13px;
  font-weight: 950;
}

.ad-header-account-icon--user .ad-icon {
  width: 18px;
  height: 18px;
}

.ad-header-account-label {
  color: var(--ad-navy);
  font-size: 13px;
  font-weight: 850;
}

.ad-header-account-chevron {
  display: inline-flex;
  align-items: center;
  color: #7d6fae;
  transition: transform 0.16s ease;
}

.ad-header-account-chevron .ad-icon {
  width: 13px;
  height: 13px;
}

.ad-header-account.is-open .ad-header-account-chevron {
  transform: rotate(180deg);
}

/* Desktop account dropdown */
.ad-header-account-menu {
  width: 320px;
  padding: 10px;
  border-radius: 20px;
}

.ad-header-account-status,
.ad-mobile-account-status {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e7e0ff;
  background: linear-gradient(135deg, #f7f5ff, #f3f7ff);
}

.ad-header-account-status {
  margin: 0 0 8px;
  padding: 12px;
  border-radius: 15px;
}

.ad-account-avatar {
  display: inline-flex !important;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 !important;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #6b3df2, #4e29c7);
  box-shadow: 0 7px 18px rgba(82, 48, 201, 0.24);
  color: #fff !important;
  font-size: 14px;
  font-weight: 950;
}

.ad-account-copy {
  display: block !important;
  min-width: 0;
  margin: 0 !important;
}

.ad-account-copy small {
  display: block;
  margin-bottom: 3px;
  color: #7b7396;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ad-account-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ad-navy);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-account-link-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-account-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid #eee9ff;
  border-radius: 12px;
  background: #fbfaff;
  color: #211b4f !important;
  font-size: 14px;
  font-weight: 850;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ad-account-link:hover,
.ad-account-link:focus-visible {
  border-color: #cdbdff;
  background: #f0ebff;
  box-shadow: 0 7px 16px rgba(82, 48, 201, 0.1);
  color: #5d34db !important;
}

.ad-account-link-icon {
  display: inline-flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #dcd1ff;
  border-radius: 9px;
  background: #eee9ff;
  color: #5d38d4;
}

.ad-account-link-icon .ad-icon {
  width: 17px;
  height: 17px;
}

.ad-account-link-label {
  min-width: 0;
}

.ad-account-link-chevron {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: #a297c8;
}

.ad-account-link-chevron .ad-icon {
  width: 15px;
  height: 15px;
}

.ad-account-link.is-logout {
  margin-top: 5px;
  border-color: #f2dede;
  background: #fff8f8;
}

.ad-account-link.is-logout .ad-account-link-icon {
  border-color: #f3dede;
  background: #fff4f4;
  color: var(--ad-danger);
}

/* Logged-out account dropdown */
.ad-header-account-primary,
.ad-header-account-secondary,
.ad-mobile-account-primary,
.ad-mobile-account-secondary,
.ad-account-signup-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
}

.ad-header-account-primary,
.ad-mobile-account-primary {
  min-height: 46px;
  background: var(--ad-purple) !important;
  color: #fff !important;
}

.ad-account-signup-prompt,
.ad-mobile-signup-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #6f668d;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

.ad-account-signup-prompt {
  padding: 10px 2px;
}

.ad-account-signup-button,
.ad-mobile-account-secondary {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #d7c9ff;
  background: #f2edff;
  color: #5a34d2 !important;
}

.ad-account-signup-button:hover,
.ad-account-signup-button:focus-visible,
.ad-mobile-account-secondary:hover,
.ad-mobile-account-secondary:focus-visible {
  border-color: #bca8ff;
  background: #e9e1ff;
}

.ad-account-utility-divider {
  margin: 0 0 8px;
  border-top: 1px solid #ece7fb;
}

.ad-account-status-action {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 46px !important;
  padding: 0 11px !important;
  border: 1px solid #e9e2ff;
  border-radius: 12px !important;
  background: #fbfaff;
  color: var(--ad-navy) !important;
  font-size: 14px;
  font-weight: 850;
}

.ad-header-account-menu-icon,
.ad-header-account-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ad-purple);
}

.ad-header-account-menu-icon .ad-icon {
  width: 18px;
  height: 18px;
}

.ad-header-account-arrow {
  margin-left: auto;
}

.ad-header-account-arrow .ad-icon {
  width: 16px;
  height: 16px;
}

.ad-account-status-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile controls hidden on desktop */
.ad-mobile-menu-toggle,
.ad-mobile-panel {
  display: none;
}

/* Compact desktop/tablet landscape: keep translated labels from colliding. */
@media (min-width: 768px) and (max-width: 1180px) {
  .ad-site-header-inner {
    gap: 14px;
    padding: 0 16px;
  }

  .ad-site-header-logo img {
    width: 150px;
  }

  .ad-site-header-nav {
    gap: 18px;
  }

  .ad-site-header-nav a {
    font-size: 14px;
  }

  .ad-site-header-actions {
    gap: 6px;
  }

  .ad-header-language-toggle {
    padding: 0 7px;
  }

  .ad-site-header-cta {
    padding: 0 14px;
    font-size: 13px;
  }
}

/* At narrower tablet widths use the mobile header instead of squeezing desktop navigation. */
@media (min-width: 768px) and (max-width: 980px) {
  .ad-header-language-desktop,
  .ad-site-header-cta,
  .ad-site-header-desktop-account,
  .ad-site-header-nav {
    display: none !important;
  }

  .ad-site-header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .ad-header-language-mobile {
    display: inline-flex !important;
  }

  .ad-mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(27, 23, 64, 0.06);
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
  }

  .ad-mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #2f258f;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .ad-site-header-inner {
    min-height: 62px;
    padding: 8px 16px;
    gap: 10px;
  }

  .ad-site-header-logo img,
  .ad-mobile-panel-logo img {
    display: block;
    width: 132px;
    height: auto;
  }

  .ad-header-language-desktop,
  .ad-site-header-cta,
  .ad-site-header-desktop-account,
  .ad-site-header-nav {
    display: none !important;
  }

  .ad-site-header-actions {
    margin-left: auto;
    gap: 8px;
  }

  .ad-header-language-mobile,
  .ad-header-language-panel {
    display: inline-flex !important;
  }

  .ad-mobile-menu-toggle,
  .ad-mobile-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(27, 23, 64, 0.06);
    cursor: pointer;
  }

  .ad-mobile-menu-toggle {
    flex-direction: column;
    gap: 5px;
  }

  .ad-mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #2f258f;
  }

  .ad-mobile-panel-close .ad-icon {
    width: 24px;
    height: 24px;
  }

  body.ad-mobile-menu-open {
    overflow: hidden !important;
  }

  body .ad-mobile-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: none !important;
    width: 100vw !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    background: var(--ad-page) !important;
  }

  body.ad-mobile-menu-open .ad-mobile-panel[aria-hidden="false"] {
    display: block !important;
  }

  body.ad-mobile-menu-open .ad-mobile-panel[aria-hidden="true"] {
    display: none !important;
  }

  .ad-mobile-panel-inner {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh !important;
    padding: 0 16px 24px !important;
  }

  .ad-mobile-panel-top {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
  }

  .ad-mobile-panel-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ad-mobile-panel-links {
    display: flex !important;
    flex-direction: column;
    padding: 8px 0 10px;
  }

  .ad-mobile-panel-links > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 7px;
    border-bottom: 1px solid rgba(216, 204, 255, 0.72);
  }

  .ad-mobile-panel-link-label {
    min-width: 0;
    color: var(--ad-navy);
    font-size: 17px;
    font-weight: 850;
  }

  .ad-mobile-panel-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ad-purple);
  }

  .ad-mobile-panel-row-icon .ad-icon {
    width: 18px;
    height: 18px;
  }

  /* Premium mobile claim CTA */
  .ad-mobile-panel-links .ad-mobile-panel-claim-cta {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 20px !important;
    align-items: center !important;
    gap: 11px !important;
    min-height: 62px !important;
    margin: 12px 0 10px !important;
    padding: 0 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #6c42f4 0%, #4c27c7 100%) !important;
    box-shadow: 0 12px 28px rgba(76, 39, 199, 0.28) !important;
  }

  .ad-mobile-panel-claim-icon {
    display: flex !important;
    flex: 0 0 40px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  .ad-mobile-panel-claim-icon .ad-icon {
    display: block !important;
    width: 25px !important;
    height: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  .ad-mobile-panel-claim-cta .ad-mobile-panel-link-label,
  .ad-mobile-panel-claim-cta .ad-mobile-panel-row-icon {
    color: #fff !important;
  }

  .ad-mobile-panel-claim-cta .ad-mobile-panel-link-label {
    font-size: 16px !important;
    font-weight: 900 !important;
  }

  /* Mobile member card */
  .ad-mobile-account-box {
    margin: 10px 0 4px;
    padding: 10px;
    border: 1px solid #d8cefb;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(27, 23, 64, 0.11);
  }

  .ad-mobile-account-status {
    margin: 0 0 8px;
    padding: 11px;
    border-radius: 14px;
  }

  .ad-mobile-account-status .ad-account-avatar {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }

  .ad-mobile-account-status .ad-account-copy {
    min-width: 0;
  }

  .ad-mobile-account-status .ad-account-copy strong {
    max-width: 310px;
    font-size: 12px;
  }

  .ad-mobile-account-box .ad-account-link {
    min-height: 46px;
    padding: 0 9px;
  }

  .ad-mobile-account-box .ad-account-link-chevron {
    opacity: 1;
    transform: none;
  }

  /* Logged-out mobile member card */
  .ad-mobile-account-box.is-logged-out {
    padding: 12px;
  }

  .ad-mobile-account-primary {
    width: 100%;
    min-height: 46px;
  }

  .ad-mobile-signup-prompt {
    padding: 10px 0 12px;
  }

  .ad-mobile-account-secondary {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }

  .ad-mobile-account-status-link {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) 20px !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 54px !important;
    padding: 0 12px !important;
    overflow: hidden !important;
    border: 1px solid #dfd5ff !important;
    border-radius: 13px !important;
    background: #faf8ff !important;
    color: var(--ad-navy) !important;
  }

  .ad-mobile-account-row-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    color: #5c43a7 !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  .ad-mobile-account-row-icon .ad-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
  }

  .ad-mobile-account-status-text {
    min-width: 0 !important;
    overflow: hidden !important;
    color: #211b4f !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .ad-mobile-account-row-chevron {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    color: var(--ad-purple) !important;
  }

  .ad-mobile-account-row-chevron .ad-icon {
    width: 17px !important;
    height: 17px !important;
  }
}

@media (max-width: 420px) {
  .ad-header-account-label {
    display: none;
  }
}

@media (max-width: 380px) {
  .ad-site-header-inner {
    padding: 8px 12px;
  }

  .ad-site-header-logo img,
  .ad-mobile-panel-logo img {
    width: 120px;
  }

  .ad-mobile-menu-toggle,
  .ad-mobile-panel-close {
    width: 38px;
    height: 38px;
  }

  .ad-mobile-signup-prompt {
    flex-direction: column;
    gap: 7px;
  }
}
