/* Képernyő-specifikus stílusok. Minden későbbi egység a saját szakaszát ide
   (vagy külön css/screens/*.css fájlba) írja. */

/* ---------- Üdvözlő képernyő (figma_login_or_register) ---------- */
.screen--welcome { display: grid; place-items: center; padding-inline: var(--space-5); }
.welcome { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.welcome__logo { border-radius: 30px; box-shadow: var(--shadow-2); }
.welcome__brand { font-size: 2.25rem; font-weight: 800; letter-spacing: 0.01em; margin-top: var(--space-3); }
.welcome__tagline { color: var(--text-muted); margin-bottom: var(--space-5); text-align: center; }
.welcome .stack { width: 100%; }

/* ---------- Kijelentkezett képernyők (belépés, 2FA, regisztráció) ---------- */
.auth { max-width: 480px; margin: 0 auto; padding: var(--space-4) var(--space-5) var(--space-6); }
.auth__header { display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); margin-bottom: var(--space-4); }
.auth__title { font-size: var(--fs-l); }
.auth__lead { color: var(--text-muted); margin-bottom: var(--space-2); }
.auth__body { display: flex; flex-direction: column; gap: var(--space-3); }
.icon-btn {
  width: var(--touch); height: var(--touch); flex: none;
  display: inline-grid; place-items: center; font-size: 2rem; line-height: 1;
  background: none; border: 0; border-radius: 50%; color: var(--text);
}
.icon-btn:active { background: var(--surface-3); }
.form-error { color: var(--danger); font-size: var(--fs-s); min-height: 1.2em; }
.form-info { color: var(--success); font-size: var(--fs-s); }
.steps { color: var(--text-muted); font-size: var(--fs-s); font-weight: 700; }
.radio-group { border: 0; padding: 0; margin: 0; display: flex; gap: var(--space-5); align-items: center; flex-wrap: wrap; }
.radio-group legend { width: 100%; padding: 0; margin-bottom: var(--space-2); }
.radio-group label { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--touch); }
.radio-group input { width: 22px; height: 22px; accent-color: var(--brand); }

/* ---------- Bejelentkezett shell: térkép + főképernyő ---------- */
.map-layer { position: fixed; inset: 0; z-index: 0; background: #e8efe6; }
.map-hidden .map-layer { visibility: hidden; }
.screen--map { position: fixed; inset: 0; z-index: 10; min-height: 0; padding: 0; pointer-events: none; overflow: hidden; }
.screen--map .home, .screen--map .sheet { pointer-events: auto; }
.leaflet-control-attribution { font-size: 10px; margin-top: calc(var(--safe-top) + 2px) !important; }

.menu-btn {
  position: fixed; z-index: 30; top: calc(var(--safe-top) + 12px); left: calc(var(--safe-left) + 12px);
  width: 52px; height: 52px; border: 0; border-radius: 14px; background: var(--brand-gradient); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-btn span { width: 26px; height: 3px; border-radius: 2px; background: #fff; }
.locate-btn {
  position: fixed; z-index: 30; top: calc(var(--safe-top) + 44px); right: calc(var(--safe-right) + 12px);
  width: 48px; height: 48px; border-radius: 50%; border: 0; font-size: 1.5rem;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-2);
}
.screen:not(.screen--map) ~ .locate-btn, .map-hidden .locate-btn { display: none; }

/* Térképjelölők */
.map-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.4);
  background: var(--brand);
}
.map-pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 14px; }
.map-pin--dropoff { background: #1b4de0; }
.map-me { width: 20px; height: 20px; border-radius: 50%; background: #1a5fd0; border: 3px solid #fff; box-shadow: 0 0 0 0 rgb(26 95 208 / 0.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 14px rgb(26 95 208 / 0); } 100% { box-shadow: 0 0 0 0 rgb(26 95 208 / 0); } }

/* ---------- Alsó, felhúzható panel ---------- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-height: 80vh; max-height: 80dvh; overflow-y: auto;
  padding: 0 var(--space-5) calc(var(--safe-bottom) + var(--space-5));
  background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-l) var(--radius-l) 0 0; box-shadow: 0 -4px 24px rgb(0 0 0 / 0.25);
}
.sheet__handle { display: block; width: 100%; height: 32px; border: 0; background: none; touch-action: none; }
.sheet__handle span { display: block; width: 56px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--text); opacity: 0.8; }
.sheet__peek { display: flex; flex-direction: column; gap: var(--space-3); }
.sheet--offer .sheet__peek { padding-top: var(--space-5); }
.sheet__body { display: none; margin-top: var(--space-4); }
.sheet--expanded .sheet__body { display: block; }

.home__city { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.home__motivation { font-size: var(--fs-s); }
.pill { align-self: flex-start; padding: var(--space-1) var(--space-3); border-radius: var(--radius-s); font-weight: 600; }
.pill--success { background: var(--success-bg); color: var(--success); }
.link-list { display: flex; flex-direction: column; }
.link-row {
  display: flex; justify-content: space-between; align-items: center; min-height: var(--touch);
  background: none; border: 0; border-bottom: 1px solid var(--border); color: var(--text);
  font-size: var(--fs-l); font-weight: 700; text-align: left; padding: 0;
}

/* Csúsztatós vezérlő */
.slider {
  position: relative; height: 60px; border-radius: var(--radius-m); background: var(--brand-gradient);
  display: grid; place-items: center; overflow: hidden; user-select: none;
}
.slider__label { color: #fff; font-weight: 700; font-size: var(--fs-l); padding-left: 40px; pointer-events: none; }
.slider__thumb {
  position: absolute; left: 4px; top: 4px; width: 52px; height: 52px; border: 0; border-radius: 12px;
  background: #fff; color: var(--brand); font-size: 1.6rem; font-weight: 800; touch-action: none;
  transition: transform 0.2s ease; box-shadow: var(--shadow-1);
}
.slider__thumb.is-dragging { transition: none; }
.slider--busy { opacity: 0.6; pointer-events: none; }

/* ---------- Oldalmenü ---------- */
.drawer { position: fixed; inset: 0; z-index: 900; }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.45); opacity: 0; transition: opacity 0.2s; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(82vw, 340px);
  padding: calc(var(--safe-top) + var(--space-3)) 0 var(--safe-bottom);
  background: var(--surface-2); color: var(--text); transform: translateX(-100%); transition: transform 0.2s ease; overflow-y: auto;
}
.drawer--open .drawer__backdrop { opacity: 1; }
.drawer--open .drawer__panel { transform: none; }
.drawer__close { margin-left: var(--space-2); }
.drawer__profile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: var(--space-4) var(--space-5); background: none; border: 0; border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); text-align: left; color: inherit;
}
.drawer__name { font-weight: 800; font-size: var(--fs-l); }
.drawer__status { font-size: var(--fs-s); color: var(--text-muted); font-weight: 600; }
.drawer__status.is-online { color: var(--success); }
.drawer__item {
  display: block; width: 100%; min-height: 56px; padding: 0 var(--space-5); text-align: left;
  background: none; border: 0; border-bottom: 2px solid var(--text); color: inherit; font-weight: 800; font-size: var(--fs-m);
}

/* ---------- Oldalpanelek (menüpontok) ---------- */
.screen:not(.screen--map) { position: relative; z-index: 20; background: var(--bg); }
.panel { max-width: 560px; margin: 0 auto; padding: var(--space-4) var(--space-5) var(--space-6); }
.panel__header { display: flex; align-items: center; gap: var(--space-2); min-height: var(--touch); margin-bottom: var(--space-4); }
.panel__title { font-size: var(--fs-xl); font-weight: 800; }
.panel__body { display: flex; flex-direction: column; gap: var(--space-4); }
.panel__section-title { font-size: var(--fs-l); font-weight: 800; }

/* ---------- Feladat (ajánlat, folyamatban) ---------- */
.offer__headline { font-size: var(--fs-xl); font-weight: 400; line-height: 1.2; }
.accent { color: var(--brand); }
.task__title { font-size: var(--fs-l); font-weight: 800; }
.task__hint { color: var(--danger); font-size: var(--fs-s); min-height: 1.2em; }
.task__code { font-size: var(--fs-l); display: inline-block; align-self: flex-start; }
.task__card { display: flex; flex-direction: column; gap: 2px; }
.tabs { display: flex; gap: var(--space-3); }
.tab {
  min-height: 40px; padding: 0 var(--space-5); border: 2px solid var(--text); border-radius: var(--radius-m);
  background: transparent; color: var(--text); font-weight: 800;
}
.tab--active { background: var(--surface); }
.task__content { display: flex; flex-direction: column; gap: var(--space-3); }
.checklist { list-style: none; margin: 0; padding: var(--space-2) var(--space-4); background: var(--surface); border-radius: var(--radius-m); }
.check { display: flex; align-items: center; gap: var(--space-3); min-height: var(--touch); font-size: var(--fs-l); }
.check input { width: 26px; height: 26px; accent-color: var(--brand); flex: none; }
.checklist__summary { text-align: center; font-size: var(--fs-l); }
.support-phone { font-size: var(--fs-xl); font-weight: 800; text-align: center; }

/* ---------- Panel-képernyők tartalma ---------- */
.segmented { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.segmented__opt { flex: 1 1 0; min-width: 84px; }
.segmented__opt input { position: absolute; opacity: 0; pointer-events: none; }
.segmented__opt span {
  display: grid; place-items: center; min-height: var(--touch); padding: 0 var(--space-3);
  border: 2px solid var(--border); border-radius: var(--radius-m); font-weight: 700; text-align: center;
}
.segmented__opt input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.segmented__opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.tabs--wrap { flex-wrap: wrap; }
.stat { font-size: var(--fs-l); }
.stat--big { text-align: center; font-size: var(--fs-xl); }
.earnings { text-align: center; }
.earnings__amount { font-size: 2.25rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.payout__head { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 0; background: none; border: 0; text-align: left; color: inherit; min-height: var(--touch); }
.payout__summary { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-s); }
.payout__amount { font-size: var(--fs-xl); font-weight: 800; color: var(--brand); text-align: right; }
.payout__detail { margin-top: var(--space-3); border-top: 1px solid var(--border); }
.payout__day { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-s); }
.area-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.area-row {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); width: 100%; min-height: var(--touch);
  padding: var(--space-2) var(--space-4); border: 2px solid var(--border); border-radius: var(--radius-m); background: var(--surface); color: var(--text);
}
.area-row--selected { border-color: var(--brand); }
.area-row__name { font-size: var(--fs-l); font-weight: 800; }
.area-row:disabled { opacity: 1; cursor: default; }
.zones { position: fixed; inset: 0; pointer-events: none; }
.zones > * { pointer-events: auto; }
.zones__status { position: absolute; left: var(--space-4); right: var(--space-4); bottom: calc(var(--safe-bottom) + var(--space-4)); }
.menu-btn--back { color: #fff; font-size: 2.2rem; line-height: 1; }
.tabs--wrap { flex-wrap: nowrap; }
.tabs--wrap .tab { flex: 1 1 0; padding: 0 var(--space-2); }
.settings-note { font-size: var(--fs-s); color: var(--text-muted); }
