/* EagerSky public header + mobile bottom nav */

.es-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  width: 100%;
  max-width: none;
  transform: none;
  box-sizing: border-box;
  background: #ffffff;
}

.es-topbar__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  width: 100%;
  box-sizing: border-box;
  padding:
    0
    max(16px, env(safe-area-inset-right, 0px))
    0
    max(16px, env(safe-area-inset-left, 0px));
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  box-shadow: none;
}

.es-topbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  order: 1;
}

.es-topbar__logo-img {
  height: 32px;
  max-height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
}

.es-topbar__links,
.es-topbar__cta,
.es-topbar__dashboard,
.es-topbar__avatar,
.es-topbar__icon--desktop {
  display: none;
}

.es-topbar__menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  order: 3;
  flex: 0 0 auto;
  margin: 0;
  height: 36px;
  padding: 0 16px;
  border: 0;
  background: #fff7ed;
  color: #c2410c;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.es-topbar__menu-btn i {
  font-size: 0.875rem;
}

.es-topbar__menu-btn[aria-expanded="true"] {
  background: #c2410c;
  color: #ffffff;
}

.es-topbar__panel {
  margin-top: 0;
  padding: 8px 12px 12px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  display: block;
}

.es-topbar__panel.hidden {
  display: none !important;
}

.es-topbar__panel-nav,
.es-topbar__panel-account {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.es-topbar__panel-account {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.es-topbar__panel-link,
.es-topbar__panel-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

.es-topbar__panel-link:hover,
.es-topbar__panel-action:hover {
  background: #fff7ed;
  color: #c2410c;
}

.es-topbar__panel-link.is-active {
  background: #fff7ed;
  color: #c2410c;
}

.es-topbar__panel-action i {
  width: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

.es-topbar__panel-action:hover i {
  color: #c2410c;
}

.es-topbar__panel-action--danger,
.es-topbar__panel-action--danger i {
  color: #ef4444;
}

.es-topbar__panel-action--danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.es-topbar__panel-action--danger:hover i {
  color: #dc2626;
}

.es-topbar__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  order: 2;
  flex: 1 1 auto;
  margin-left: 0;
}

.es-topbar__utils {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  padding-right: 0;
}

.es-topbar__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: #64748b;
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.es-topbar__badge,
.es-topbar__icon .nav-wishlist-count:not(.hidden) {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.es-topbar__icon--desktop {
  display: none;
}

.es-topbar__icon:hover {
  color: #c2410c;
  background: #fff7ed;
}

.es-topbar__icon i {
  font-size: 1rem;
}

.es-topbar-spacer {
  height: 56px;
}

body.has-mobile-nav,
body.has-portal-mobile-nav {
  padding-top: 56px;
}

body.has-mobile-nav .es-topbar-spacer,
body.has-portal-mobile-nav .es-topbar-spacer {
  display: none;
}

.es-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px;
  height: auto;
  padding:
    0.35rem max(10px, env(safe-area-inset-left, 0px))
    calc(0.35rem + env(safe-area-inset-bottom, 0px))
    max(10px, env(safe-area-inset-right, 0px));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  z-index: 9999;
  box-sizing: border-box;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.es-bottom-nav > .grid,
.es-bottom-nav > .es-bottom-nav__row {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.es-bottom-nav.safe-bottom {
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

.es-bottom-nav__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  padding: 0.2rem 0.15rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  transition: color 0.2s ease, transform 0.15s ease;
}

button.es-bottom-nav__item {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.es-bottom-nav__item i {
  font-size: 18px;
  line-height: 1;
}

.es-bottom-nav__item.is-active {
  color: #c2410c;
}

.es-bottom-nav__item:active {
  transform: scale(0.96);
}

.es-bottom-nav__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 16px);
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-bottom-nav__item {
  position: relative;
}

.es-topbar__badge.hidden,
.nav-wishlist-count.hidden {
  display: none !important;
}

.es-public-wide,
.es-public-footer {
  max-width: 1400px;
  width: 100%;
}

.es-public-footer {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 992px) {
  .es-topbar {
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    transform: none;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: none;
    z-index: 9999;
  }

  .es-topbar__bar {
    height: 70px !important;
    width: 100%;
    padding: 0 1.5rem !important;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: 0;
    box-sizing: border-box;
  }

  body.has-mobile-nav .es-topbar__bar {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  body.has-portal-mobile-nav .es-topbar__bar {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  body.has-mobile-nav,
  body.has-portal-mobile-nav {
    padding-top: 0;
  }

  body.has-mobile-nav .es-topbar-spacer,
  body.has-portal-mobile-nav .es-topbar-spacer {
    display: block;
  }

  .es-topbar__logo,
  .es-topbar__menu-btn,
  .es-topbar__actions {
    order: unset;
  }

  .es-topbar__actions {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: 0;
  }

  .es-topbar__utils {
    margin-left: 0;
    padding-right: 0;
    gap: 8px;
  }

  .es-topbar__logo-img {
    height: 36px;
    max-height: 36px;
  }

  .es-topbar__menu-btn,
  .es-topbar__panel {
    display: none !important;
  }

  .es-topbar__links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1 1 auto;
  }

  .es-topbar__more {
    position: relative;
  }

  .es-topbar__more-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }

  .es-topbar__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    padding: 8px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.06);
    z-index: 60;
  }

  .es-topbar__dropdown.hidden {
    display: none;
  }

  .es-topbar__dropdown-link {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
  }

  .es-topbar__dropdown-link:hover {
    background: #fff7ed;
    color: #c2410c;
  }

  .es-topbar__dropdown-link.is-active {
    background: #c2410c;
    color: #ffffff;
  }

  .es-topbar__link {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }

  .es-topbar__link:hover {
    color: #0f172a;
    background: #f1f5f9;
  }

  .es-topbar__link.is-active {
    background: #c2410c;
    color: #ffffff;
  }

  .es-topbar__cta,
  .es-topbar__dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #c2410c;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(194, 65, 12, 0.22);
    transition: background 0.2s ease, transform 0.2s ease;
  }

  .es-topbar__cta:hover,
  .es-topbar__dashboard:hover {
    background: #9a3412;
  }

  .es-topbar__icon--desktop,
  .es-topbar__avatar {
    display: inline-flex;
  }

  .es-topbar__actions {
    gap: 8px;
  }

  .es-bottom-nav,
  .mobile-bottom-nav.es-bottom-nav {
    display: none !important;
  }

  .es-topbar-spacer {
    height: 70px;
  }

  body.has-mobile-nav .es-topbar-spacer,
  body.has-portal-mobile-nav .es-topbar-spacer {
    height: 70px !important;
    margin: 0;
    padding: 0;
  }

  body.has-mobile-nav main.mobile-main-pad,
  body.has-portal-mobile-nav main.mobile-portal-pad {
    padding-top: 0.75rem !important;
  }

  body.has-mobile-nav.is-home-page main.mobile-main-pad {
    padding-top: 0 !important;
  }

  body.has-mobile-nav:not(.has-portal-mobile-nav) main.mobile-main-pad {
    padding-bottom: 0 !important;
  }
}

/* Staff / admin / super-admin portal topbar */
.es-topbar--portal .es-topbar__portal {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.es-topbar__portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.es-topbar--red .es-topbar__portal-badge {
  background: #fef2f2;
  color: #dc2626;
}

.es-topbar__portal-badge i {
  font-size: 0.75rem;
}

.es-topbar__portal-site {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.es-topbar__portal-site:hover {
  color: #c2410c;
  background: #fff7ed;
}

.es-topbar__panel-heading {
  margin: 0;
  padding: 0.35rem 0.75rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
}

@media (min-width: 1024px) {
  .es-topbar--portal .es-topbar__portal {
    display: flex;
  }

  .es-topbar--portal .es-topbar__menu-btn,
  .es-topbar--portal .es-topbar__panel {
    display: none !important;
  }

  .es-topbar__portal-context--mobile {
    display: none !important;
  }
}

@media (max-width: 1023px) {
  .es-topbar--portal .es-topbar__dashboard {
    display: none;
  }
}

/* Portal mobile bottom nav — match public es-bottom-nav styling */
.portal-mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: 56px;
  padding:
    0.35rem max(10px, env(safe-area-inset-left, 0px))
    calc(0.35rem + env(safe-area-inset-bottom, 0px))
    max(10px, env(safe-area-inset-right, 0px));
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  z-index: 9999;
  box-sizing: border-box;
}

.portal-mobile-bottom-nav > .grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
}

.portal-mobile-tab,
.portal-mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  padding: 0.2rem 0.15rem;
  color: #64748b;
  text-decoration: none;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  transition: color 0.2s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.portal-mobile-tab:active,
.portal-mobile-menu:active,
.es-topbar__menu-btn--portal:active {
  transform: scale(0.96);
}

.es-topbar__menu-btn--site {
  background: #f8fafc;
  color: #475569;
}

.es-topbar__menu-btn--site[aria-expanded="true"] {
  background: #c2410c;
  color: #ffffff;
}

.portal-mobile-tab.is-active,
.portal-mobile-tab.text-primary,
.portal-mobile-tab.text-red-600 {
  color: #c2410c;
}

.portal-mobile-tab.text-red-600,
.portal-mobile-menu.text-red-600 {
  color: #dc2626;
}

button.portal-mobile-menu {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}

.portal-mobile-tab i,
.portal-mobile-menu i {
  font-size: 18px;
  line-height: 1;
}
