/* =========================================================
   EVENT HUB — site chrome
   The header cluster and the mobile bottom bar.

   Tokens fall back to their own values so these components
   still look right if the theme's stylesheet is not present.
   ========================================================= */

:root {
  --tsh-green: #a9c92d;
  --tsh-green-bright: #c6ea3d;
  --tsh-white: #f5f5f0;
  --tsh-gray: #a8a8a1;
  --tsh-dim: #6f6f68;
  --tsh-surface: #111;
  --tsh-surface-2: #171717;
  --tsh-border: rgba(255, 255, 255, .1);
  --tsh-border-2: rgba(255, 255, 255, .18);
  --tsh-ease: cubic-bezier(.16, .84, .44, 1);
}

/* ---------------------------------------------------------
   Header cluster
   --------------------------------------------------------- */
.evh-hdr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- cart --- */
.evh-hdr-cart {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--tsh-white);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background .18s var(--tsh-ease), border-color .18s var(--tsh-ease), color .18s var(--tsh-ease);
}

.evh-hdr-cart:hover {
  background: rgba(255, 255, 255, .06);
  border-color: var(--tsh-border);
  color: var(--tsh-green-bright);
}

.evh-cart-count {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tsh-green);
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  font-style: normal;
}

.evh-cart-count.is-empty { display: none; }

/* --- logged out --- */
.evh-hdr-auth {
  display: flex;
  align-items: center;
  gap: 6px;
}

.evh-hdr-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--tsh-gray);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--tsh-ease), background .18s var(--tsh-ease);
}

.evh-hdr-login:hover { color: var(--tsh-white); background: rgba(255, 255, 255, .05); }

.evh-hdr-signup {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--tsh-border-2);
  color: var(--tsh-white);
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .18s var(--tsh-ease), color .18s var(--tsh-ease);
}

.evh-hdr-signup:hover { border-color: var(--tsh-green); color: var(--tsh-green); }

/* --- logged in --- */
.evh-hdr-account { position: relative; }

.evh-hdr-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--tsh-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--tsh-white);
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s var(--tsh-ease), background .18s var(--tsh-ease);
}

.evh-hdr-account-btn:hover { border-color: var(--tsh-border-2); background: rgba(255, 255, 255, .07); }
.evh-hdr-account-btn svg { transition: transform .2s var(--tsh-ease); opacity: .65; }
.evh-hdr-account-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.evh-hdr-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--tsh-green) 0%, #7a9420 100%);
  color: #0a0a0a;
  font-weight: 800;
  font-size: .9rem;
  line-height: 1;
}

.evh-hdr-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evh-hdr-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 200;
  min-width: 232px;
  padding: 8px;
  border: 1px solid var(--tsh-border-2);
  border-radius: 14px;
  background: #0d0d0d;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .95);
  animation: evh-pop .16s var(--tsh-ease);
}

@keyframes evh-pop {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: none; }
}

.evh-hdr-menu[hidden] { display: none; }

.evh-hdr-menu-who {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--tsh-border);
  margin-bottom: 6px;
}

.evh-hdr-menu-who strong {
  display: block;
  color: var(--tsh-white);
  font-size: .92rem;
}

.evh-hdr-menu-who span {
  display: block;
  color: var(--tsh-dim);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evh-hdr-menu ul { list-style: none; margin: 0; padding: 0; }

.evh-hdr-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--tsh-gray);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s var(--tsh-ease), color .15s var(--tsh-ease);
}

.evh-hdr-menu a:hover { background: rgba(255, 255, 255, .06); color: var(--tsh-white); }
.evh-hdr-menu a svg { opacity: .7; flex: 0 0 auto; }

.evh-hdr-menu-out {
  margin-top: 6px;
  border-top: 1px solid var(--tsh-border);
  padding-top: 10px !important;
}

.evh-hdr-menu-out:hover { color: #ff6b5e !important; }

/* ---------------------------------------------------------
   Header responsive behaviour

   The account cluster is the first thing to go on a phone —
   it lives in the drawer instead, where there is room for it.
   --------------------------------------------------------- */
@media (max-width: 1024px) {
  .evh-hdr-name { display: none; }
  .evh-hdr-account-btn { padding: 5px; }
  .evh-hdr-account-btn > svg { display: none; }
}

@media (max-width: 960px) {
  /* The theme's drawer is 98% opaque, which leaves a ghost of the page
     showing through the menu text. Close the last two per cent, and leave
     room at the bottom for the tab bar. */
  .nav-links {
    background: #050505;
    padding-bottom: 96px;
  }
}

@media (max-width: 860px) {
  .evh-hdr-auth { display: none; }
  .evh-hdr-account { display: none; }

  /* Inside the mobile drawer they come back, full width. */
  .nav-links .evh-hdr-auth {
    display: flex;
    width: 100%;
    gap: 10px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--tsh-border);
  }

  .nav-links .evh-hdr-auth > a {
    flex: 1 1 0;
    justify-content: center;
    padding: 13px 16px;
    font-size: .95rem;
  }

  .nav-links .evh-hdr-login {
    border: 1px solid var(--tsh-border-2);
    color: var(--tsh-white);
  }

  .nav-links .evh-hdr-signup {
    background: var(--tsh-green);
    border-color: var(--tsh-green);
    color: #0a0a0a;
  }

  .nav-links .evh-hdr-account {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--tsh-border);
  }

  .nav-links .evh-hdr-account-btn { width: 100%; justify-content: flex-start; padding: 8px 12px 8px 8px; }
  .nav-links .evh-hdr-name { display: block; max-width: none; }
  .nav-links .evh-hdr-account-btn > svg { display: block; margin-left: auto; }

  .nav-links .evh-hdr-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
    box-shadow: none;
    background: rgba(255, 255, 255, .03);
    animation: none;
  }
}

/* ---------------------------------------------------------
   Mobile bottom bar
   --------------------------------------------------------- */
.evh-tabbar { display: none; }

@media (max-width: 860px) {
  .evh-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 190;
    display: grid;
    align-items: stretch;
    background: rgba(8, 8, 8, .86);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-top: 1px solid var(--tsh-border);
    /* Clear of the iPhone home indicator. */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .evh-tabbar-1 { grid-template-columns: 1fr; }
  .evh-tabbar-2 { grid-template-columns: repeat(2, 1fr); }
  .evh-tabbar-3 { grid-template-columns: repeat(3, 1fr); }
  .evh-tabbar-4 { grid-template-columns: repeat(4, 1fr); }

  .evh-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px 10px;
    color: var(--tsh-dim);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    position: relative;
    /* A comfortable thumb target, whatever the label length. */
    min-height: 56px;
    transition: color .18s var(--tsh-ease);
  }

  .evh-tab-ico {
    position: relative;
    display: grid;
    place-items: center;
    width: 30px;
    height: 26px;
  }

  .evh-tab-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .evh-tab:active { color: var(--tsh-white); }

  .evh-tab.is-active { color: var(--tsh-green-bright); }

  .evh-tab.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--tsh-green);
  }

  .evh-tab-badge {
    position: absolute;
    top: -3px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--tsh-green);
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    font-style: normal;
  }

  /* Keep the bar off the footer's last line. */
  body:has(.evh-tabbar) { padding-bottom: 60px; }
}

/* A floating WhatsApp button and a fixed bar both want the same
   corner. Lift the button above it. */
@media (max-width: 860px) {
  body:has(.evh-tabbar) .whatsapp-fab,
  body:has(.evh-tabbar) .wa-fab,
  body:has(.evh-tabbar) .evh-ticket-bar { bottom: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .evh-hdr-menu { animation: none; }
}
