/* Είσοδος */
.join { min-height: 100%; max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px;
  padding: calc(32px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); }
.join-head { display: flex; flex-direction: column; gap: 10px; }
.join-logo { height: 58px; width: auto; align-self: flex-start; margin-bottom: 18px; }
.join-head .eyebrow { color: var(--accent); }
.join-fields { display: flex; flex-direction: column; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code-input { font-family: var(--font-display) !important; font-weight: 800 !important; font-size: 22px !important;
  letter-spacing: .06em; text-transform: uppercase; }
.form-error { background: var(--sos-soft); border: 1px solid var(--sos-line); border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.join .btn.cta { margin-top: auto; }

/* Κύρια οθόνη */
#map { position: absolute; inset: 0; }
.hud-top { position: absolute; left: 0; right: 0; top: 0; z-index: 500; padding: calc(10px + var(--safe-top)) 12px 0;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.trip-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.trip-logo { height: 30px; width: auto; }
.vr { width: 1px; align-self: stretch; background: var(--line); }
.trip-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.trip-text .eyebrow { color: var(--accent); }
.trip-name { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-chips { display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.hud-chips > * { pointer-events: auto; }
.glass-chip { height: 30px; padding: 0 12px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 4px 14px rgba(0,0,0,.3); background-color: rgba(16,18,21,.84); }
.glass-chip.ok { color: var(--ok-ink); } .glass-chip.check { color: var(--warn-ink); }
.glass-chip.sos { color: #FF8A8F; } .glass-chip.grey { color: #B9BFC6; } .glass-chip.info { color: #7FD3FF; }

.notice { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-align: left; width: 100%; color: var(--text); }
.notice-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent); }
.notice-body { flex: 1; min-width: 0; }
.notice-title { font-weight: 800; font-size: 14px; }
.notice-text { font-size: 13px; color: var(--text-2); line-height: 1.4; margin-top: 2px; }
.notice-meta { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.notice-info { border-color: var(--accent-line); }

.map-tools { position: absolute; right: 12px; bottom: calc(232px + var(--safe-bottom)); z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.round { width: 48px; height: 48px; border-radius: 16px; color: var(--text); display: grid; place-items: center; padding: 0; }

.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; padding: 0 12px calc(12px + var(--safe-bottom));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
.route-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.route-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.route-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route-km { font-size: 13px; color: var(--text-2); font-weight: 700; white-space: nowrap; }
.route-km b { color: var(--text); font-weight: 800; }
.bar-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.09); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width .6s; }
.route-off { display: flex; gap: 8px; align-items: center; color: var(--warn-ink); font-weight: 700; font-size: 13px; }
.actions { display: grid; grid-template-columns: 1fr 132px; gap: 10px; }
.glass-btn { background: var(--glass); border-color: var(--glass-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); height: 64px; border-radius: 18px; }
.sos-btn { height: 64px; border-radius: 18px; font-family: var(--font-display); font-weight: 800; font-size: 30px;
  letter-spacing: .06em; box-shadow: 0 8px 24px rgba(242,72,79,.35); }

/* SOS */
.sos-screen { background: var(--sos-bg); }
.sos-wrap { min-height: 100%; display: flex; flex-direction: column; gap: 22px; padding: calc(14px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); max-width: 520px; margin: 0 auto; width: 100%; }
.bar { display: flex; align-items: center; gap: 14px; }
.icon-btn.dark { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.sos-lead { color: #D9B9BB; margin-top: 10px; }
.sos-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sos-types button { height: 56px; border-radius: 14px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.03);
  font-size: 16px; font-weight: 800; color: #F1E4E5; transition: .15s; }
.sos-types button.sel { border: 2px solid var(--sos); background: rgba(242,72,79,.16); color: #fff; }
.hold-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 12px 0 8px; }
.hold-btn { position: relative; width: 240px; height: 240px; border-radius: 50%; border: 0; padding: 0; color: #fff;
  background: radial-gradient(circle at 50% 50%, var(--sos) 0 62%, rgba(242,72,79,.16) 63% 100%);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: transform .1s; }
.hold-btn:active, .hold-btn.holding { transform: scale(.97); }
.hold-btn .ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.hold-btn .ring circle { fill: none; stroke-width: 8; }
.hold-btn .ring .track { stroke: rgba(242,72,79,.25); }
.hold-btn .ring .prog { stroke: #fff; stroke-linecap: round; stroke-dasharray: 704; stroke-dashoffset: 704; }
.hold-btn.holding .ring .prog { transition: stroke-dashoffset 2s linear; stroke-dashoffset: 0; }
.hold-btn span { position: relative; font-size: 56px; letter-spacing: .06em; }
.hold-hint { color: #D9B9BB; font-size: 14px; }
.hold-hint b { color: #fff; }
.sent-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--sos); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(242,72,79,.35); margin-top: 28px; }
.taken { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.taken .avatar { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.taken .who { font-size: 18px; font-weight: 800; }
.sos-note { color: #C79FA2; margin: 0; }
.sent-actions { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sos-cancel { border-color: rgba(255,255,255,.12); color: #F1E4E5; }

/* Μηνύματα */
.inbox-bar { padding: calc(12px + var(--safe-top)) 16px 12px; border-bottom: 1px solid var(--line-soft); background: var(--bg); }
.msg-list { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 84%; padding: 12px 14px; border-radius: 18px 18px 18px 6px; font-size: 15px; line-height: 1.45;
  background: var(--surface); border: 1px solid var(--line-soft); align-self: flex-start; }
.msg.all { background: var(--accent-soft); border-color: var(--accent-line); }
.msg.mine { align-self: flex-end; background: var(--surface-2); border-color: var(--line); border-radius: 18px 18px 6px 18px; }
.msg .meta { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.msg.all .meta { color: var(--accent); }
.msg-empty { color: var(--muted); text-align: center; margin-top: 40px; }
.reply { display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line-soft); background: var(--bg); }
.reply .input { border-radius: 16px; }
.send-btn { width: 52px; padding: 0; border-radius: 16px; }

/* Τα glass chips κρατούν σκούρο φόντο ώστε να διαβάζονται πάνω στον χάρτη */
.chip.glass-chip { background-color: rgba(16,18,21,.88); }
.hud-bottom { padding-bottom: calc(20px + var(--safe-bottom)); }
#main .leaflet-control-attribution { font-size: 8px; opacity: .8; }

/* Χάρτης MapLibre */
#map .maplibregl-ctrl-attrib { font-size: 9px; background: rgba(10,11,13,.6); color: #9AA1AA; }
#map .maplibregl-ctrl-attrib a { color: #C7CCD2; }
#map .maplibregl-ctrl-bottom-right { bottom: calc(150px + var(--safe-bottom)); }
.me { width: 64px; height: 64px; position: relative; pointer-events: none; }
.me .me-dot { position: absolute; left: 22px; top: 22px; }
.me-cone { position: absolute; left: 12px; top: -6px; width: 40px; height: 48px; display: none;
  background: linear-gradient(to top, rgba(0,170,255,.55), rgba(0,170,255,0)); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.me.has-heading .me-cone { display: block; }
.cam-btn.on { color: var(--accent); }
.cam-n { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
#map .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner { display: none; }
#map .maplibregl-ctrl-attrib.maplibregl-compact { background: rgba(10,11,13,.6); }

/* Μεγαλύτερα γράμματα πάνω στον χάρτη (για ανάγνωση εν κινήσει) */
.glass-chip { height: 34px; font-size: 14px; padding: 0 14px; }
.notice-text { font-size: 15px; }
.notice-meta { font-size: 12px; }
.trip-text .eyebrow { font-size: 12px; }
.route-name { font-size: 21px; }
.route-km { font-size: 15px; }
.route-km b { font-size: 18px; }
.route-tools { display: flex; gap: 8px; }
.mini-btn { height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text-2);
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.mini-btn.done { color: var(--ok-ink); border-color: rgba(47,212,126,.35); }

/* Κουμπί οδηγιών στη μπάρα εκδρομής */
.trip-bar { width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; }
.help-dot { margin-left: auto; width: 28px; height: 28px; border-radius: 14px; border: 1px solid var(--line); display: grid; place-items: center;
  font-weight: 800; font-size: 13px; color: var(--text-2); flex-shrink: 0; }

/* Οδηγίες */
.setup-wrap { max-width: 520px; margin: 0 auto; padding: calc(28px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.setup-logo { height: 44px; width: auto; align-self: flex-start; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 12px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.steps li { display: flex; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); }
.steps li b { font-weight: 800; }
.steps li p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.steps li .btn { margin-top: 10px; }
.st-ico { width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 16px; position: relative; }
.steps li.ok .st-ico { background: var(--ok); color: transparent; font-size: 0; }
.steps li.ok .st-ico::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 6px; border: 2.8px solid #04210F; border-top: 0; border-right: 0; transform: translate(-50%, -70%) rotate(-45deg); }
.steps li.bad .st-ico { background: var(--sos-soft); color: #FF8A8F; }
.dl-progress { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.setup-wrap .cta { margin-top: auto; }
.sms-btn { background: #1F2A1F; border-color: rgba(47,212,126,.4); color: #CFF5DE; white-space: normal; text-align: center; height: auto; min-height: 56px; padding: 12px 16px; }

.sent-icon.wait { background: #3A2A2C; box-shadow: none; }

/* Ορατοί σε όλους (ασθενοφόρο, διασώστης…) */
.pub { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; }
.pub-ico { width: 34px; height: 34px; border-radius: 17px; background: #fff; color: #0A0B0D; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.45); border: 2.5px solid #0A0B0D; }
.pub.med .pub-ico { color: #F2484F; }
.pub-lbl { background: rgba(10,11,13,.9); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.pub-pop .maplibregl-popup-content { background: #16181C; color: var(--text); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); font-family: var(--font-body); min-width: 170px; }
.pub-pop .maplibregl-popup-tip { border-top-color: #16181C; border-bottom-color: #16181C; }
.pp-l { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pp-n { font-size: 16px; font-weight: 800; margin-top: 2px; }
.pp-t { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.pub-pop .btn { width: 100%; color: var(--accent-ink); }

.my-num { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); margin-top: 6px; }
.my-num .mn { grid-row: 1 / span 2; grid-column: 1; font-size: 44px; color: var(--accent); min-width: 56px; text-align: center; }
.my-num .eyebrow { color: var(--accent); }

/* Υπεύθυνη δήλωση */
#waiver { background: var(--bg); }
.waiver-text { flex: 1; padding: 16px 20px 24px; font-size: 15px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; max-width: 680px; margin: 0 auto; width: 100%; }
.waiver-form { padding: 14px 16px calc(14px + var(--safe-bottom)); border-top: 1px solid var(--line-soft); background: var(--bg-2);
  display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin: 0 auto; width: 100%; }
.waiver-hint { font-size: 13px; font-weight: 700; color: var(--warn-ink); }
.waiver-hint.ok { color: var(--ok-ink); }
.waiver-form input:disabled { opacity: .5; }

/* ---- Επίπεδο διαδρομής (Normal / Hard) ---- */
.pick-wrap { max-width: 460px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 40px) 20px 32px; display: flex; flex-direction: column; gap: 12px; }
.pick-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pick-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
  color: var(--text); text-align: left; width: 100%; font: inherit; cursor: pointer; }
.pick-card:active { transform: scale(.99); }
.pick-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pick-body { flex: 1; min-width: 0; }
.pick-name { font-size: 15px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-km { font-weight: 800; font-size: 18px; white-space: nowrap; }
.lvl { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-family: 'Roboto Condensed', sans-serif;
  font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.lvl.hard { background: var(--warn-soft); color: var(--warn-ink); border-color: rgba(255,178,36,.4); }
.pick-card .lvl { height: 30px; font-size: 16px; padding: 0 12px; }
.route-head .lvl { margin-right: 8px; vertical-align: 3px; }
.lvl-btn { cursor: pointer; font: inherit; }
.notice-hard { border-color: rgba(255,178,36,.45); flex-wrap: wrap; }
.notice-hard .notice-icon { background: var(--warn-soft); color: var(--warn-ink); }
.notice-actions { display: flex; gap: 8px; width: 100%; }
.notice-actions .btn { flex: 1; }
#pick { overflow-x: hidden; }
.pick-wrap { width: 100%; box-sizing: border-box; }
.pick-wrap .h1 { overflow-wrap: anywhere; }
.pick-card { box-sizing: border-box; min-width: 0; }
.pick-card { display: grid; grid-template-columns: auto 1fr; row-gap: 10px; }
.pick-card .pick-km { justify-self: end; }
.pick-card .pick-body { grid-column: 1 / -1; order: 3; }
.pick-card .pick-name { white-space: normal; font-size: 16px; color: var(--text); font-weight: 600; margin: 0; }
.lvl-btn { background: none; border: 0; padding: 0; margin: 0; color: inherit; -webkit-appearance: none; appearance: none; }
.msg.pending { opacity: .6; }
