/**
 * TASK 48 / 48-FIX01 — Executive Corporate Premium audience navigation
 * Palette: #06101c #0b1a2e #123a7a #d4b06a #e8eef6
 * Scoped shared classes for corporate, v3, and redesign chrome.
 */

.abp-aud {
  --abp-aud-navy: #06101c;
  --abp-aud-surface: #0b1a2e;
  --abp-aud-royal: #123a7a;
  --abp-aud-gold: #d4b06a;
  --abp-aud-mist: #e8eef6;
  display: inline-flex;
  align-items: stretch;
  gap: 0.35rem;
  /* Task 48-FIX01: never shrink capsules into neighboring nav labels */
  flex: 0 0 auto;
  max-width: 100%;
}

.abp-aud__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0.38rem 0.78rem;
  border: 1px solid rgba(212, 176, 106, 0.55);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(18, 58, 122, 0.22) 0%, transparent 55%),
    var(--abp-aud-surface);
  color: var(--abp-aud-mist) !important;
  text-decoration: none !important;
  text-transform: uppercase;
  font-size: 0.68rem !important;
  font-weight: 500;
  letter-spacing: 0.05em !important;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(6, 16, 28, 0.35), 0 6px 16px rgba(6, 16, 28, 0.18);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.abp-aud__icon {
  flex-shrink: 0;
  color: var(--abp-aud-gold);
}

.abp-aud__label {
  min-width: 0;
}

.abp-aud__btn:hover {
  border-color: rgba(212, 176, 106, 0.9);
  background:
    linear-gradient(180deg, rgba(18, 58, 122, 0.4) 0%, rgba(11, 26, 46, 0.95) 70%),
    var(--abp-aud-navy);
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(6, 16, 28, 0.4), 0 8px 18px rgba(6, 16, 28, 0.28);
}

.abp-aud__btn:focus-visible {
  outline: 2px solid var(--abp-aud-gold);
  outline-offset: 2px;
  color: #fff !important;
}

.abp-aud__btn.is-on {
  border-color: rgba(212, 176, 106, 0.85);
  background: linear-gradient(135deg, #123a7a 0%, #0e4a8c 55%, #0b1a2e 100%);
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(212, 176, 106, 0.25), 0 8px 18px rgba(6, 16, 28, 0.32);
}

.abp-aud__btn.is-on .abp-aud__icon {
  color: var(--abp-aud-gold);
}

/* Footer stacked Quick Access */
.abp-aud-foot {
  min-width: 0;
}

.abp-aud-foot__label {
  /* Task 56C — tighter footer audience label */
  margin: 0 0 0.35rem;
  color: rgba(232, 238, 246, 0.72);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.abp-aud--stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: 100%;
  max-width: 16.5rem;
  flex: 1 1 auto;
}

.abp-aud--stack .abp-aud__btn {
  width: 100%;
  justify-content: flex-start;
  border-radius: 0.55rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  white-space: normal;
  text-align: left;
}

/* Indonesian labels — readable, not crushed */
html[lang="id"] .abp-aud__btn {
  font-size: 0.64rem !important;
  letter-spacing: 0.04em !important;
  padding: 0.36rem 0.7rem;
}

/*
 * Task 59B — Compact desktop HEADER capsules (keep row; do not stack).
 * Footer .abp-aud--stack unchanged.
 */
@media (min-width: 1101px) and (max-width: 1439px) {
  .abp-aud:not(.abp-aud--stack) {
    gap: 0.28rem;
  }
  .abp-aud:not(.abp-aud--stack) .abp-aud__btn,
  html[lang="id"] .abp-aud:not(.abp-aud--stack) .abp-aud__btn {
    min-height: 2.15rem;
    padding: 0.32rem 0.62rem;
    font-size: 0.62rem !important;
    letter-spacing: 0.04em !important;
  }
}

/*
 * Task 48-FIX01 / 59B: stack HEADER capsules only inside mobile drawer (was 1440px).
 * Footer stacked Quick Access uses .abp-aud--stack and is unaffected by :not(.abp-aud--stack) rules above.
 */
@media (max-width: 1100px) {
  .abp-aud:not(.abp-aud--stack) {
    width: 100%;
    margin: 0.45rem 0 0.35rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .abp-aud:not(.abp-aud--stack) .abp-aud__btn,
  html[lang="id"] .abp-aud:not(.abp-aud--stack) .abp-aud__btn {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 10rem;
    min-height: 2.55rem;
    font-size: 0.7rem !important;
    letter-spacing: 0.045em !important;
    padding: 0.5rem 0.75rem;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

@media (max-width: 640px) {
  .abp-aud__btn,
  html[lang="id"] .abp-aud__btn {
    flex: 1 1 100%;
  }
  .abp-aud--stack .abp-aud__btn {
    min-height: 2.75rem;
  }
}

/* Redesign header: keep capsules from colliding with adjacent links */
.rx-nav > .abp-aud {
  margin-right: 0.25rem;
}

body.rx .rx-footer .abp-aud-foot {
  margin: 0;
}

body.rx .rx-footer .abp-aud-foot__label {
  color: rgba(232, 238, 246, 0.7);
}

@media (prefers-reduced-motion: reduce) {
  .abp-aud__btn {
    transition: none;
  }
}
