/* ==========================================================
   Booking Extras — City search + Jalali picker
   ========================================================== */

/* Region notice badge */
.region-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  margin: 14px 0;
  font-size: .82rem;
  line-height: 1.75;
  border-width: 1.5px;
  border-style: solid;
}
.region-notice.region-internal {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}
.region-notice.region-provincial {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E40AF;
}
.region-notice.region-extra {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}
.region-notice .region-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.2;
}
.region-notice strong {
  display: block;
  margin-bottom: 3px;
  font-size: .85rem;
}
.region-notice p {
  margin: 0;
  font-size: .78rem;
  opacity: .92;
}

/* Jalali picker */
input[data-jalali] {
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%2316A34A'><path d='M7 2v2H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2V2h-2v2H9V2H7zm12 8v10H5V10h14z'/></svg>");
  background-repeat: no-repeat;
  background-position: left 10px center;
  padding-left: 32px;
  direction: rtl;
  text-align: right;
}
input[data-jalali]::placeholder {
  color: #94A3B8;
  font-size: .78rem;
}

.jalali-popup {
  position: absolute;
  z-index: 5000;
  background: #fff;
  border: 1px solid #E3EDE7;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15,61,46,.18);
  padding: 12px;
  width: 280px;
  display: none;
  direction: rtl;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  user-select: none;
}

.jp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 8px;
}
.jp-title {
  font-weight: 800;
  font-size: .88rem;
  color: #0F3D2E;
  flex: 1;
  text-align: center;
}
.jp-nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #E3EDE7;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  color: #475569;
  display: grid;
  place-items: center;
  transition: .15s;
}
.jp-nav:hover { background: #16A34A; color: #fff; border-color: #16A34A; }

.jp-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.jp-weekdays span {
  text-align: center;
  font-size: .68rem;
  font-weight: 700;
  color: #94A3B8;
  padding: 4px 0;
}

.jp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.jp-empty {
  display: block;
  height: 32px;
}
.jp-day {
  height: 32px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: #94A3B8;
  transition: .15s;
  display: grid;
  place-items: center;
}
.jp-day.jp-enabled { color: #1A2332; }
.jp-day.jp-enabled:hover {
  background: #F0FDF4;
  color: #16A34A;
}
.jp-day.jp-today {
  border: 1.5px solid #86EFAC;
  color: #16A34A;
}
.jp-day.jp-selected {
  background: #16A34A;
  color: #fff !important;
}
.jp-day.jp-selected:hover { background: #15803D; }

.jp-footer {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
}
.jp-btn {
  flex: 1;
  padding: 7px;
  background: #F1F5F9;
  color: #334155;
  border: 0;
  border-radius: 7px;
  font-family: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
}
.jp-btn:hover { background: #16A34A; color: #fff; }
.jp-btn-clear:hover { background: #EF4444; }

/* Region badge in price preview */
.price-region-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 800;
  margin-right: 6px;
}
.price-region-badge.region-internal { background: #DCFCE7; color: #166534; }
.price-region-badge.region-provincial { background: #DBEAFE; color: #1E40AF; }
.price-region-badge.region-extra { background: #FEF3C7; color: #92400E; }

/* Mobile */
@media (max-width: 700px) {
  .jalali-popup {
    width: calc(100vw - 16px) !important;
    left: 8px !important;
    right: 8px !important;
    max-width: 320px;
    margin: 0 auto;
  }
  .jp-day { height: 34px; font-size: .85rem; }
}

/* ==========================================================
   Back to profile button
   ========================================================== */
.panel-title-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.back-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: .76rem;
  font-weight: 700;
  text-decoration: none;
  transition: .2s;
  white-space: nowrap;
}
.back-profile-btn:hover {
  background: #E2E8F0;
  color: #0F3D2E;
  border-color: #16A34A;
}
@media (max-width: 700px) {
  .back-profile-btn { font-size: .72rem; padding: 5px 10px; }
}

/* Province-City cascade spacing */
.booking-grid-2 + .booking-grid-2 {
  margin-top: 6px;
}

/* Persian date inline span */
.persian-date {
  display: inline;
}
/* Invalid route styling */
.region-notice.region-invalid {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
}
.region-notice.region-invalid strong {
  color: #991B1B;
}
.price-region-badge.region-invalid {
  background: #FEE2E2;
  color: #991B1B;
}

/* ==================== ROUTE COLUMNS (step 1) ==================== */
.route-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.route-column {
  background: #F7FAF8;
  border: 1.5px solid #E3EDE7;
  border-radius: 14px;
  padding: 16px;
  min-width: 0;
}

.route-column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: .9rem;
  color: #0F3D2E;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #E3EDE7;
}
.route-col-icon {
  font-size: .7rem;
}

.route-column .booking-block {
  margin-bottom: 12px;
}
.route-column .booking-block:last-child {
  margin-bottom: 0;
}

/* Mobile: stack columns and force correct ORDER */
@media (max-width: 700px) {
  .route-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}