/* ===========================================================
   Fahrschule Peppermint — Website
   Ported from the Flutter app (dark theme, peppermint green)
   =========================================================== */

:root {
  --bg: #1a1a1a;
  --surface: #282828;
  --surface-2: #242424;
  --surface-3: #2b2b2b;
  --green: #63d471;
  --green-soft: #7fe78b;
  --green-ink: #0e2101;
  --border: #3b3b3b;
  --border-soft: #595959;
  --text: #cccccc;
  --text-strong: #e2e2e2;
  --text-dim: #c8c8c8;
  --radius: 18px;
  --maxw: 760px;
  --shadow: 0 8px 14px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ----------------------------- App bar ----------------------------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 3px solid var(--green);
}

.appbar__grad {
  background: linear-gradient(
    90deg,
    rgba(99, 212, 113, 0.5) 0%,
    rgba(99, 212, 113, 0) 40%
  );
}

.appbar__inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 25px;
}

.appbar__logo {
  width: 30px;
  height: 30px;
  flex: 0 0 auto; /* never shrink the logo */
}

.appbar__logo svg path {
  fill: var(--text) !important;
}

.appbar__title {
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0; /* allow the text (not the logo) to shrink */
}

/* Bottom tab bar (app-style navigation) */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 55;
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color 0.15s;
}

.tabbar a svg {
  width: 24px;
  height: 24px;
}

.tabbar a.active {
  color: var(--green);
}

/* Portal (embedded web view) */
.portal-frame {
  position: fixed;
  top: 73px; /* app bar (70px) + green border (3px) */
  left: 0;
  right: 0;
  bottom: 64px; /* bottom tab bar */
  width: 100%;
  border: 0;
  background: var(--bg);
}

.portal-fallback {
  max-width: 460px;
  margin: 60px auto 0;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 28px;
}

.portal-fallback svg {
  width: 56px;
  height: 56px;
  color: var(--green);
  margin-bottom: 16px;
}

.portal-fallback h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.4rem;
}

.portal-fallback p {
  margin: 0 0 24px;
  color: var(--text);
  line-height: 1.5;
}

.portal-fallback a.btn-green {
  display: inline-block;
  text-decoration: none;
}

/* ----------------------------- Layout ----------------------------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 16px 140px;
}

.section-gap {
  height: 72px;
}

.section-title {
  text-align: center;
  margin: 0;
}

.section-title__bar {
  width: 96px;
  height: 4px;
  background: var(--green);
  border-radius: 999px;
  margin: 0 auto 10px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text);
}

/* ----------------------------- Hero ----------------------------- */
.hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.hero__mascot {
  width: clamp(88px, 28vw, 132px);
  height: clamp(88px, 28vw, 132px);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.hero__mascot svg {
  width: 78%;
  height: 78%;
}

.hero__mascot svg path {
  fill: #ffffff !important;
}

.bubble {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--green);
  border-radius: 20px;
  padding: 18px 18px 18px 24px;
  color: var(--text);
  font-weight: 600;
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
}

.bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-right: 12px solid var(--green);
}

.bubble::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-right: 10px solid var(--surface);
}

/* ----------------------------- Option buttons ----------------------------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 56px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.05s;
}

.option-btn:hover {
  border-color: var(--green);
}

.option-btn:active {
  transform: scale(0.995);
}

.option-btn__label {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 18px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text);
}

.option-btn__arrow {
  width: 74px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--green-ink);
  border-radius: 28px 16px 16px 28px;
}

/* Chevron drawn with CSS borders so it stays perfectly centered (no font-metric offset). */
.option-btn__arrow::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translateX(-3px) rotate(45deg);
}

/* ----------------------------- Success rate ----------------------------- */
.success-card {
  margin-top: 16px;
  background: #242424;
  border: 1.2px solid var(--border);
  border-radius: 22px;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, 0.15);
}

.success-card h3 {
  margin: 0 0 14px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.success-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.counter {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #2d2d2d, #222222);
  border: 1px solid #414141;
}

.counter__label {
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.counter__value {
  display: flex;
  align-items: flex-end;
  margin-top: 6px;
}

.counter__num {
  font-size: 2.5rem;
  line-height: 0.95;
  font-weight: 800;
  color: var(--text);
}

.counter__pct {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c7c7c7;
  margin-left: 3px;
  margin-bottom: 4px;
}

.counter__track {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #181818;
  overflow: hidden;
}

.counter__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--green-soft));
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ----------------------------- Team ----------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.team-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-card__role {
  height: 34px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 1.3px;
  color: var(--text);
  border-bottom: 1.4px solid var(--border);
}

.team-card__photo {
  aspect-ratio: 9 / 10;
  padding: 10px;
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.team-card__name {
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  letter-spacing: 1.2px;
  color: var(--text);
  border-top: 1.4px solid var(--border);
}

/* ----------------------------- Map / Anfahrt ----------------------------- */
.map-frame {
  border: 2.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  height: 350px;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.info-block {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 8px 0;
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: var(--text);
}

.info-block .right {
  text-align: right;
}

.info-block a {
  color: var(--green);
}

/* ----------------------------- Contact form ----------------------------- */
.contact-box {
  background: var(--surface);
  border: 1px solid rgba(99, 212, 113, 0.7);
  border-radius: 24px;
  padding: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.field label .req {
  color: #ff5b5b;
}

.field input,
.field textarea {
  background: #1f1f1f;
  border: 2px solid var(--border);
  border-radius: 6px;
  padding: 14px;
  color: var(--text-strong);
  font-size: 1rem;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
}

.field-row {
  display: flex;
  gap: 16px;
}

.field-row .field {
  flex: 1;
  min-width: 0;
}

.btn-green {
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 12px 28px;
}

.form-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #9a9a9a;
}

/* ----------------------------- Floating buttons ----------------------------- */
.fab {
  position: fixed;
  bottom: 80px; /* sit above the bottom tab bar */
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--green);
  color: #132100;
  border: none;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.33);
  z-index: 60;
}

.fab svg {
  width: 28px;
  height: 28px;
}

.fab--call {
  left: 16px;
}

.fab--chat {
  right: 16px;
}

/* ----------------------------- Chatbot ----------------------------- */
.chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
}

.chat-backdrop.open {
  display: block;
}

.chat-sheet {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom: 148px;
  max-width: 460px;
  margin-left: auto;
  max-height: 70vh;
  background: #1f1f1f;
  border: 1.3px solid var(--green);
  border-radius: 24px;
  padding: 12px 16px 14px;
  z-index: 70;
  display: none;
  flex-direction: column;
}

.chat-sheet.open {
  display: flex;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-head__title {
  flex: 1;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.chat-head svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}

.chat-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  padding: 4px 8px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.msg {
  max-width: 280px;
  padding: 10px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.msg--bot {
  align-self: flex-start;
  background: var(--surface-3);
  color: var(--text);
}

.msg--user {
  align-self: flex-end;
  background: var(--green);
  color: #000;
}

.chat-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chat-opt {
  min-height: 46px;
  padding: 10px 16px;
  background: #343434;
  border: 1.2px solid var(--border-soft);
  border-radius: 24px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
  transition: background 0.15s;
}

.chat-opt:hover {
  background: #404040;
}

/* ----------------------------- Price page ----------------------------- */
.license-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.license-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  height: 96px;
  padding: 0 18px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 20px;
  color: var(--text-strong);
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s;
}

.license-btn:hover {
  border-color: var(--green);
}

.license-btn .icon {
  font-size: 2.6rem;
  color: var(--green);
  width: 44px;
  text-align: center;
}

.license-btn .title {
  flex: 1;
  font-size: 1.8rem;
  font-weight: 700;
}

.license-btn .chev {
  font-size: 2rem;
  color: var(--green);
}

/* Calculator */
.calc {
  max-width: 460px;
  margin: 0 auto;
}

.seg {
  display: inline-flex;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 15px;
}

.seg button {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-strong);
}

.seg button.active {
  background: var(--green);
  color: var(--green-ink);
}

.calc__title {
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--green);
  margin: 0 0 28px;
}

.total-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 20px;
  padding: 18px 16px;
}

.total-card .icon {
  font-size: 2.6rem;
  color: var(--green);
  line-height: 1;
}

.total-card .label {
  flex: 1;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-strong);
}

.total-card .price {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
  border-bottom: 3px solid var(--green);
  padding-bottom: 3px;
  white-space: nowrap;
}

.slider-wrap {
  margin-top: 24px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  cursor: pointer;
}

.slider-caption {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--text-strong);
  text-align: center;
}

.slider-caption b {
  font-weight: 700;
}

.slider-caption .hl {
  color: var(--green);
  text-decoration: underline;
}

.pricelist-btn {
  width: 100%;
  margin-top: 34px;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-strong);
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
}

.pricelist-btn .chev {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.price-table td {
  border: 1px solid var(--border);
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.price-table tr:nth-child(odd) {
  background: var(--surface);
}

.price-table tr:nth-child(even) {
  background: var(--surface-2);
}

.price-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* ----------------------------- Modal ----------------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 80;
  padding: 40px 20px;
}

.modal.open {
  display: flex;
  align-items: center;
  animation: fadein 0.25s ease;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
}

.modal__card {
  width: 100%;
  max-width: 460px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  animation: slideup 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideup {
  from {
    transform: translateY(40px);
    opacity: 0.4;
  }
}

.modal__head {
  height: 54px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px 14px 0 0;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--text-strong);
  font-size: 1.1rem;
  font-weight: 600;
}

.modal__head .chev {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

/* ----------------------------- Routes ----------------------------- */
.route-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.route-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  border: none;
  color: var(--text);
  text-align: left;
  transition: transform 0.05s, box-shadow 0.15s;
}

.route-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.route-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: var(--green);
  background: var(--surface-2);
  border-radius: 12px;
  flex: 0 0 auto;
}

.route-card__name {
  flex: 1;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.route-card__go {
  color: #4d9fff;
  font-size: 1.6rem;
}

.route-more {
  text-align: center;
  padding: 22px;
  color: #bdbdbd;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Route map (OpenStreetMap via Leaflet) */
.route-map {
  height: 380px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.route-map .leaflet-container {
  background: #1a1a1a;
}

/* Panorama viewer */
.pano {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  cursor: grab;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.pano.dragging {
  cursor: grabbing;
}

.pano__img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: auto;
  max-width: none;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

.pano__hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  pointer-events: none;
}

.route-detail__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-link {
  color: var(--green);
  font-weight: 700;
  font-size: 1rem;
}

.fab--nav {
  right: 16px;
  background: #2f7fff;
  color: #fff;
}

.hidden {
  display: none !important;
}

/* ----------------------------- Responsive ----------------------------- */
@media (max-width: 520px) {
  .appbar__title {
    font-size: 0.95rem;
  }
  .info-block {
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .appbar__title {
    font-size: 0.82rem;
  }
  .option-btn__label {
    font-size: 1.05rem;
  }
  .license-btn .title {
    font-size: 1.4rem;
  }
}

@media (min-width: 1100px) {
  .page {
    max-width: 720px;
  }
}
