:root{
  --mtb-primary1:#06116E;
  --mtb-primary2:#6D7DEC;
  --mtb-primary-gradient: linear-gradient(90deg, var(--mtb-primary1), var(--mtb-primary2));
  --mtb-primary-soft: rgba(109,125,236,.10);
  --mtb-primary-border: rgba(109,125,236,.28);
}

.mtb-card{
  position:relative;
  overflow:hidden;
  max-width: 420px;
  background:#fff;
  border-radius:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  padding:18px 18px 14px;
  border:1px solid rgba(0,0,0,.06);
}
.mtb-card:before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:6px;
  background: var(--mtb-primary-gradient);
}
.mtb-title{
  font-size:18px;
  font-weight:700;
  margin:2px 0 14px;
}
.mtb-subtitle{
  font-size:16px;
  font-weight:700;
  margin:4px 0 12px;
}
.mtb-field{ margin-bottom:12px; }
.mtb-field label{
  display:block;
  font-size:12px;
  color:#444;
  margin-bottom:6px;
  font-weight:600;
}
.mtb-input, .mtb-select, .mtb-textarea{
  width:100%;
  box-sizing:border-box;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.14);
  padding:9px 12px;
  font-size:14px;
  background:#fff;
  outline:none;
}
.mtb-input:focus, .mtb-select:focus, .mtb-textarea:focus{
  border-color: rgba(0,0,0,.35);
}
.mtb-btn{
  width:100%;
  border:0;
  border-radius:999px;
  padding:12px 14px;
  font-size:15px;
  font-weight:700;
  background: var(--mtb-primary-gradient);
  color:#fff;
  cursor:pointer;
  transition:transform .05s ease-in-out, opacity .2s ease-in-out;
}
.mtb-btn:active{ transform:scale(.99); }
.mtb-btn[disabled]{ opacity:.55; cursor:not-allowed; }

.mtb-btn-ghost{
  background:#fff;
  color:#111;
  border:1px solid rgba(0,0,0,.14);
}

.mtb-actions{
  display:flex;
  gap:10px;
}
.mtb-actions .mtb-btn{ width:auto; flex:1; }

.mtb-price{
  padding:12px;
  border-radius:12px;
  background: var(--mtb-primary-soft);
  border: 1px solid var(--mtb-primary-border);
  margin:10px 0 12px;
}
.mtb-price-label{
  font-size:12px;
  color:#555;
  font-weight:700;
  margin-bottom:4px;
}
.mtb-price-value{
  font-size:22px;
  font-weight:800;
}
.mtb-route-meta{
  margin-top:6px;
  font-size:12px;
  color:#666;
}
.mtb-error{
  margin-top:8px;
  font-size:12px;
  color:#b00020;
  font-weight:700;
}

.mtb-bullets{
  margin:12px 0 0;
  padding-left:18px;
  color:#333;
  font-size:12px;
}
.mtb-bullets li{ margin:6px 0; }

.mtb-summary{
  background:#f8f8f8;
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:12px;
  margin:12px 0;
}
.mtb-summary-line{ margin:6px 0; font-size:13px; }

.mtb-alert{
  max-width:420px;
  border-radius:12px;
  padding:12px 14px;
  margin-bottom:12px;
  border:1px solid rgba(0,0,0,.08);
}
.mtb-success{ background:#ecfff3; border-color:#b5f0c9; color:#0b6b2c; font-weight:700; }

.mtb-error{
  margin-top:8px;
  font-size:12px;
  color:#b00020;
  font-weight:700;
}

.mtb-alert.mtb-error{
  margin-top:8px;
  font-size:12px;
  color:#b00020;
  font-weight:700;
}

.mtb-field input[type="checkbox"]{
  width:18px;
  height:18px;
}

.mtb-price-breakdown{
  margin-top:8px;
  font-size:12px;
  color:#444;
}
.mtb-bd-line{ margin:4px 0; }
.mtb-bd-total{ margin-top:6px; }

.mtb-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
@media (max-width: 340px){
  .mtb-row{ grid-template-columns: 1fr; }
}
.mtb-field{ margin-bottom:10px; }
.mtb-card{ padding:16px 16px 12px; }
.mtb-price{ margin:8px 0 10px; }
.mtb-bullets{ margin:10px 0 0; }
.mtb-field-checkbox label{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  font-weight:600;
  color:#333;
  margin-top:22px;
}
@media (max-width: 420px){
  .mtb-field-checkbox label{ margin-top:0; }
}


/* ===== Compact UI (mobile-first adjustments) ===== */
.mtb-card{
  max-width: 440px;
}

.mtb-field{ margin-bottom:8px; }
.mtb-field label{
  font-size:11px;
  margin-bottom:4px;
}

.mtb-input, .mtb-select, .mtb-textarea{
  padding:8px 11px;
  font-size:14px;
}

.mtb-price{
  padding:10px;
  margin:8px 0 10px;
}
.mtb-price-value{ font-size:20px; }
.mtb-route-meta{ margin-top:4px; }
.mtb-price-breakdown{ margin-top:6px; }

.mtb-btn{ padding:11px 14px; font-size:14px; }

.mtb-bullets{ font-size:11px; }

/* Reduce overall height on mobile */
@media (max-width: 480px){
  .mtb-card{
    max-width: 100%;
    padding:14px 14px 10px;
    border-radius:16px;
  }
  .mtb-title{ font-size:16px; margin:0 0 10px; }
  .mtb-subtitle{ font-size:15px; margin:0 0 10px; }

  .mtb-field{ margin-bottom:8px; }
  .mtb-input, .mtb-select, .mtb-textarea{ padding:8px 10px; }

  .mtb-price-value{ font-size:19px; }
  .mtb-price{ border-radius:12px; }

  /* Hide marketing bullets on mobile to keep it compact */
  .mtb-bullets{ display:none; }

  /* Stack action buttons on step 2 to avoid cramped row */
  .mtb-actions{ flex-direction:column; }
  .mtb-actions .mtb-btn{ width:100%; }

  /* Tighten summary */
  .mtb-summary{ padding:10px; margin:10px 0; }
  .mtb-summary-line{ margin:4px 0; font-size:12.5px; }

  /* Checkbox row: keep compact */
  .mtb-field-checkbox label{ margin-top:0; font-size:12.5px; }
}

/* Optional: even smaller devices */
@media (max-width: 360px){
  .mtb-title{ font-size:15px; }
  .mtb-price-value{ font-size:18px; }
}


/* ===== Extra compact mobile (reduce height) ===== */
@media (max-width: 480px){
  .mtb-card{ padding:12px 12px 10px; }
  .mtb-title{ margin:0 0 8px; }
  .mtb-field{ margin-bottom:6px; }
  .mtb-field label{ margin-bottom:2px; }
  .mtb-input, .mtb-select, .mtb-textarea{ padding:7px 10px; }
  .mtb-price{ padding:8px 10px; margin:6px 0 8px; }
  .mtb-route-meta{ display:none; }          /* hide km/duration to save space */
  .mtb-price-breakdown{ display:none; }     /* hide breakdown (total already shown) */
  .mtb-summary{ padding:8px 10px; }
  .mtb-summary-line{ margin:3px 0; font-size:12px; }
  .mtb-actions{ margin-top:8px; gap:8px; }
}


/* Slightly tighter desktop spacing */
.mtb-field{ margin-bottom:8px; }
.mtb-card:before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:6px;
  background: var(--mtb-primary-gradient);
}
.mtb-title{ margin:0 0 10px; }
.mtb-price{ margin:8px 0 10px; }


/* Roundtrip badge styling */
.mtb-rt{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.mtb-rt-title{
  font-weight:800;
  color:#111;
  font-size:14px;
}
.mtb-rt-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:4px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  color:#0b6b2c;
  background:#ecfff3;
  border:1px solid #b5f0c9;
  line-height:1;
}
.mtb-rt-hint{
  font-size:12px;
  color:#666;
  font-weight:600;
  white-space:nowrap;
}
.mtb-rt input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
}
@media (max-width: 480px){
  .mtb-rt{
    gap:8px;
    padding:9px 10px;
  }
  .mtb-rt-hint{
    font-size:11px;
    white-space:normal;
  }
}

.mtb-btn-ghost:hover{
  border-color: rgba(109,125,236,.45);
}


/* ===== Theme colors (from settings) ===== */
.mtb-card{
  --mtb-primary1: var(--mtb-primary1, #06116E);
  --mtb-primary2: var(--mtb-primary2, #6D7DEC);
}

/* Gradient button */
.mtb-btn{
  background: linear-gradient(90deg, var(--mtb-primary1, #06116E), var(--mtb-primary2, #6D7DEC)) !important;
  border: 0 !important;
  color: #fff !important;
}

/* Accent bar (top line) */
.mtb-accent-bar, .mtb-topbar, .mtb-header-bar{
  background: linear-gradient(90deg, var(--mtb-primary1, #06116E), var(--mtb-primary2, #6D7DEC)) !important;
}

/* Focus */
.mtb-input:focus, .mtb-select:focus, .mtb-textarea:focus{
  border-color: var(--mtb-primary2, #6D7DEC) !important;
  box-shadow: 0 0 0 3px rgba(109, 125, 236, .18) !important;
}

/* Price block border */
.mtb-price{
  border-color: rgba(6, 17, 110, .18) !important;
}
