/* HFZ Egyéni Stúdió — referencia pixel-stílus (#4FBEC8) */

:root {
  --es-bg: #0a0e14;
  --es-surface: #121820;
  --es-surface-2: #161d27;
  --es-line: rgba(148, 163, 184, 0.14);
  --es-text: #f0f3f6;
  --es-muted: #8b949e;
  --es-teal: #4fbec8;
  --es-teal-dim: rgba(79, 190, 200, 0.14);
  --es-radius: 12px;
  --es-font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body.es-body {
  margin: 0;
  min-height: 100%;
  background: var(--es-bg);
  color: var(--es-text);
  font-family: var(--es-font);
  -webkit-font-smoothing: antialiased;
}

.es-app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Fejléc ── */
.es-header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 2.5rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--es-line);
}

.es-header-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.es-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  min-width: 0;
}

.es-beta-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: #f87171;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
}

.es-icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--es-text);
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-size: 1.2rem;
}

/* ── Lépés sáv ── */
.es-step-bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem 0.25rem;
}

.es-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--es-teal);
  color: #0a0e14;
  font-size: 0.9rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.es-step-copy {
  flex: 1;
  min-width: 0;
}

.es-step-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.es-step-title-row strong {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.es-step-progress {
  font-size: 0.72rem;
  color: var(--es-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.es-instruction {
  margin: 0;
  padding: 0.35rem 1rem 0.45rem;
  color: var(--es-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.es-pick-hint {
  margin: 0;
  padding: 0 1rem 0.45rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--es-teal);
  line-height: 1.35;
}

.es-pick-hint.is-empty {
  color: var(--es-muted);
  font-weight: 500;
}

/* ── Zóna látvány ── */
.es-diagram {
  margin: 0 0.85rem 0.65rem;
  padding: 0.65rem 0.35rem;
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  background: linear-gradient(
    180deg,
    rgba(79, 190, 200, 0.06) 0%,
    var(--es-surface) 100%
  );
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-zone-visual-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.es-zone-visual-img {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  opacity: 0.95;
  filter: drop-shadow(0 0 14px rgba(79, 190, 200, 0.28));
}

.es-zone-visual-img--seat {
  width: 4.5rem;
  height: 4.5rem;
}

/* ── Két panel ── */
.es-panels {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 0.45rem;
  padding: 0 0.85rem 0.75rem;
  min-height: 0;
}

.es-panel-left,
.es-panel-right {
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  background: var(--es-surface);
  min-height: 260px;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.es-panel-head-wrap {
  padding: 0.55rem 0.55rem 0.25rem;
  border-bottom: 1px solid var(--es-line);
}

.es-panel-head {
  margin: 0;
  padding: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--es-muted);
  text-transform: uppercase;
}

.es-panel-sub {
  margin: 0.12rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--es-teal);
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
}

/* Bal: ikon | felirat | kapcsoló — fix rácson, ne csússzon */
.es-seat-row {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr) 2.35rem;
  align-items: start;
  column-gap: 0.35rem;
  padding: 0.5rem 0.45rem;
  border-bottom: 1px solid var(--es-line);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.es-seat-row.is-active {
  border-left-color: var(--es-teal);
  background: rgba(79, 190, 200, 0.06);
}

.es-seat-row.is-picked:not(.is-active) {
  background: rgba(79, 190, 200, 0.03);
}

.es-seat-row.is-picked .es-seat-label {
  color: var(--es-text);
}

.es-seat-row:last-child {
  border-bottom: none;
}

.es-row-ico-wrap {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}

.es-row-ico {
  width: 1.55rem;
  height: 1.55rem;
  object-fit: contain;
  display: block;
  opacity: 1;
}

.es-seat-label {
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.es-seat-row--no-ico {
  grid-template-columns: minmax(0, 1fr) 2.35rem;
  column-gap: 0.5rem;
  padding: 0.55rem 0.5rem;
}

.es-seat-row--no-ico .es-seat-label {
  font-size: 0.78rem;
  line-height: 1.38;
}

.es-switch {
  position: relative;
  width: 2.35rem;
  height: 1.35rem;
  justify-self: end;
  margin-top: 0.05rem;
  border: none;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  transition: background 0.18s ease;
}

.es-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease;
}

.es-switch.is-on::after {
  transform: translateX(1.05rem);
}

/* Jobb panel */
.es-right-body {
  padding: 0.5rem 0.55rem 0.65rem;
}

.es-switch.is-on {
  background: var(--es-teal);
}

.es-right-kicker {
  margin: 0 0 0.12rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--es-muted);
  text-transform: uppercase;
}

.es-right-title {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--es-text);
  line-height: 1.2;
}

.es-right-section {
  margin-bottom: 0.55rem;
}

.es-right-section h3 {
  margin: 0 0 0.28rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--es-muted);
  text-transform: uppercase;
}

.es-check-row {
  display: grid;
  grid-template-columns: 0.95rem minmax(0, 1fr);
  align-items: start;
  column-gap: 0.4rem;
  row-gap: 0.12rem;
  padding: 0.38rem 0;
  cursor: pointer;
  font-size: 0.76rem;
  line-height: 1.35;
}

.es-check-row-no-price {
  grid-template-columns: 0.95rem minmax(0, 1fr);
}

.es-check-row:not(.es-check-row-no-price) .es-check-box {
  grid-row: 1 / span 2;
  margin-top: 0.12rem;
}

.es-check-row:not(.es-check-row-no-price) .es-check-label {
  grid-column: 2;
  grid-row: 1;
}

.es-check-row:not(.es-check-row-no-price) .es-check-price {
  grid-column: 2;
  grid-row: 2;
  text-align: left;
  padding-left: 0;
  padding-top: 0;
  font-size: 0.68rem;
}

.es-check-box {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 3px;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  background: transparent;
  flex-shrink: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0a0e14;
  font-size: 0.58rem;
  line-height: 1;
}

.es-check-row.is-on .es-check-box {
  background: var(--es-teal);
  border-color: var(--es-teal);
}

.es-check-row.is-partial .es-check-box {
  background: rgba(79, 190, 200, 0.35);
  border-color: var(--es-teal);
  color: var(--es-teal);
}

.es-check-row.is-partial .es-check-price {
  color: var(--es-text);
}

.es-check-label {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.es-check-price {
  color: var(--es-muted);
  white-space: normal;
  font-size: 0.64rem;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
  padding-left: 0.2rem;
  padding-top: 0.05rem;
  line-height: 1.3;
}

.es-check-row.is-on .es-check-price {
  color: var(--es-text);
}

.es-right-empty {
  font-size: 0.76rem;
  color: var(--es-muted);
  line-height: 1.45;
  margin: 0;
}

/* ── Footer — referencia ── */
.es-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--es-line);
  background: var(--es-bg);
}

.es-footer-total {
  flex: 1;
  min-width: 0;
}

.es-footer-total > .es-muted {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--es-muted);
  margin-bottom: 0.1rem;
}

.es-footer-total strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--es-text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.es-btn-primary {
  border: none;
  border-radius: 10px;
  background: var(--es-teal);
  color: #0a0e14;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0 0.75rem;
  min-height: 2.75rem;
  min-width: 0;
  max-width: 58%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.es-btn-primary i {
  font-size: 0.95rem;
}

.es-btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Hub / pakli (megmarad) ── */
.es-muted {
  color: var(--es-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.es-hub-intro {
  padding: 1rem 1.1rem 0.5rem;
}

.es-hub-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.5rem 1rem 1rem;
}

.es-hub-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  background: var(--es-surface);
  color: inherit;
  text-decoration: none;
}

.es-hub-row strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
  line-height: 1.25;
  word-break: break-word;
}

.es-hub-row .es-muted {
  font-size: 0.72rem;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.es-hub-step {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--es-teal-dim);
  color: var(--es-teal);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.es-hub-badge {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--es-teal);
  color: #0a0e14;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.es-hub-chevron {
  color: var(--es-muted);
  font-size: 0.9rem;
}

.es-footer-mins {
  display: block;
  font-size: 0.75rem;
  color: var(--es-muted);
}

.es-pakli-head {
  padding: 0.85rem 1rem 0.35rem;
}

.es-pakli-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.es-pakli-list {
  flex: 1;
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.es-pakli-zone {
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  background: var(--es-surface);
  padding: 0.75rem;
}

.es-pakli-zone h3 {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--es-teal);
}

.es-pakli-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  line-height: 1.3;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--es-line);
}

.es-pakli-item > span:first-child {
  min-width: 0;
  word-break: break-word;
}

.es-pakli-item > span:last-child {
  white-space: nowrap;
  text-align: right;
  font-weight: 600;
}

.es-pakli-item:last-child {
  border-bottom: none;
}

.es-drawer[hidden] {
  display: none !important;
}

.es-drawer {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.es-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.es-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 88vw);
  height: 100%;
  background: var(--es-surface);
  border-left: 1px solid var(--es-line);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.es-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.es-drawer-link {
  color: var(--es-text);
  text-decoration: none;
  padding: 0.55rem 0.35rem;
  font-size: 0.88rem;
  border-radius: 6px;
}

.es-drawer-link.is-active {
  color: var(--es-teal);
  background: var(--es-teal-dim);
}

.es-loading .es-panels {
  opacity: 0.45;
  pointer-events: none;
}

@media (max-width: 520px) {
  .es-panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .es-panel-left,
  .es-panel-right {
    min-height: auto;
  }
}

@media (max-width: 360px) {
  .es-seat-row {
    grid-template-columns: 1.5rem minmax(0, 1fr) 2.25rem;
    padding: 0.45rem 0.4rem;
  }

  .es-seat-row--no-ico {
    grid-template-columns: minmax(0, 1fr) 2.25rem;
  }

  .es-row-ico {
    width: 1.45rem;
    height: 1.45rem;
  }

  .es-check-row {
    font-size: 0.74rem;
  }

  .es-check-price {
    font-size: 0.66rem;
  }

  .es-btn-primary {
    max-width: 62%;
    font-size: 0.72rem;
    padding: 0 0.55rem;
  }
}
