
#savedAddressModal,
#serviceDetailsModal,
.tsm-modal-scope {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tsm-modal-scope .modal-dialog-scrollable .modal-content,
#savedAddressModal .modal-dialog-scrollable .modal-content,
#serviceDetailsModal .modal-dialog-scrollable .modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Default width for both modals */
#serviceDetailsModal .modal-xl,
.tsm-modal-scope .modal-xl,
.tsm-modal-scope .modal-lg {
  max-width: 1060px;
  width: 95%;
}

/* Saved Address modal is narrower */
#savedAddressModal .modal-lg,
#savedAddressModal .modal-xl {
  max-width: 900px;
  width: 95%;
}

.tsm-xl-wrapper {
  background: #f4f7fb !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
}

/* ---------- 2. Header ---------- */
.tsm-xl-header {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(9, 71, 92, 0.16);
}

.tsm-header-left-box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.tsm-header-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tsm-header-title-wrap {
  min-width: 0;
}

.tsm-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.3px;
}

.tsm-header-sub {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.tsm-header-sub::before {
  content: '';
  width: 6px;
  height: 6px;
  background-color: #34d399;
  border-radius: 50%;
  display: inline-block;
}

.tsm-header-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tsm-header-price-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 7px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tsm-header-price-badge i {
  font-size: 20px;
  color: #e0f2fe;
}

.tsm-price-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tsm-header-price-label {
  font-size: 9.5px;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.6px;
  opacity: 0.9;
  font-weight: 700;
}

.tsm-header-price-val {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.tsm-header-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tsm-header-close-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.06);
  color: #ffffff;
}

/* ---------- 3. Body ---------- */
.tsm-xl-body {
  flex: 1 1 auto;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding: 20px 24px;
  -webkit-overflow-scrolling: touch;
}

.tsm-xl-body::-webkit-scrollbar { width: 6px; }
.tsm-xl-body::-webkit-scrollbar-track { background: #e2e8f0; }
.tsm-xl-body::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
.tsm-xl-body::-webkit-scrollbar-thumb:hover { background: #64748b; }

.tsm-badge-primary {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
}

.tsm-description-text {
  font-size: 13px;
  color: #334155;
  line-height: 1.55;
  margin: 0;
}

/* ---------- 4. Footer ---------- */
.tsm-xl-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  padding: 14px 24px;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tsm-footer-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: #475569;
}

.tsm-footer-contact a {
  color: #0d5f78;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tsm-footer-contact a:hover {
  color: #083b4b;
  text-decoration: underline;
}

.tsm-footer-contact i {
  color: #0d5f78;
  font-size: 14px;
}

.tsm-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tsm-footer-btn {
  border-radius: 30px;
  padding: 9px 24px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.tsm-btn-secondary {
  background-color: #64748b;
  color: #ffffff;
}

.tsm-btn-secondary:hover {
  background-color: #475569;
  color: #ffffff;
}

.tsm-btn-primary {
  background-color: #09475c;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(9, 71, 92, 0.25);
}

.tsm-btn-primary:hover {
  background-color: #063140;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(9, 71, 92, 0.35);
  transform: translateY(-1px);
}

/* =========================================================
   5. SAVED ADDRESS MODAL ONLY (.tsm-address-modal)
   ========================================================= */
.tsm-address-modal .modal-dialog {
  max-width: 620px;
  width: 95%;
}

.tsm-address-modal .tsm-header-sub {
  color: rgba(255, 255, 255, 0.85);
}

.tsm-addr-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tsm-addr-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tsm-addr-card:hover {
  border-color: #0d5f78;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13, 95, 120, 0.12);
}

.tsm-addr-card.active {
  border-color: #09475c;
  background: #f0f8fb;
  box-shadow: 0 0 0 1px #09475c;
}

.tsm-addr-card.active:active {
  background: #e0eff4;
  transform: translateY(0) scale(0.985);
}

.tsm-addr-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: #e0f2fe;
  color: #0d5f78;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.tsm-addr-card.is-primary .tsm-addr-icon {
  background: #fef3c7;
  color: #d97706;
}

.tsm-addr-main {
  flex: 1;
  min-width: 0;
}

.tsm-addr-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.tsm-addr-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.tsm-addr-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 999px;
}

.tsm-addr-text {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

.tsm-addr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.tsm-addr-meta i {
  color: #0d5f78;
  margin-right: 4px;
}

.tsm-addr-arrow {
  font-size: 22px;
  color: #cbd5e1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tsm-addr-card:hover .tsm-addr-arrow {
  color: #0d5f78;
  transform: translateX(3px);
}

.tsm-addr-empty {
  text-align: center;
  padding: 36px 12px;
  color: #94a3b8;
}

.tsm-addr-empty i {
  font-size: 38px;
  margin-bottom: 8px;
}

.tsm-addr-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

@media (max-width: 576px) {
  .tsm-addr-card { padding: 12px; gap: 10px; }
  .tsm-addr-icon { width: 36px; height: 36px; min-width: 36px; font-size: 16px; }
}

/* =========================================================
   6. SERVICE DETAILS MODAL ONLY
   ========================================================= */
.tsm-top-hero-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
}

/* Timing slot badges */
.tsm-slot-badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  letter-spacing: 0.2px;
  white-space: nowrap;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all 0.15s ease;
}

.tsm-slot-badge:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.tsm-slot-separator {
  color: #94a3b8;
  margin: 0 5px;
  font-weight: normal;
}

.tsm-equal-row {
  display: flex;
  flex-wrap: wrap;
}

.tsm-equal-row > [class*="col-"] {
  min-width: 0;
}

.tsm-fixed-box {
  height: 310px;
  display: flex;
  flex-direction: column;
}

.tsm-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tsm-section-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.tsm-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.tsm-section-header h5 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.2px;
}

.tsm-circle-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tsm-circle-icon.blue { background: #e0f2fe; color: #0284c7; }
.tsm-circle-icon.red  { background: #fef3c7; color: #d97706; }

/* Meta table & key-value tiles */
.tsm-meta-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  min-width: 0;
  width: 100%;
}

.tsm-meta-table::-webkit-scrollbar { width: 5px; }
.tsm-meta-table::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.tsm-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  gap: 8px 12px;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  transition: all 0.15s ease;
}

.tsm-meta-row:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.tsm-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  flex-shrink: 0;
  white-space: nowrap;
}

.tsm-meta-left i {
  font-size: 16px;
  color: #0d5f78;
}

.tsm-meta-right {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  text-align: right;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

/* Timings row: stacked, badges left-aligned */
.tsm-meta-row.tsm-meta-row-timings,
.tsm-meta-row:has(.tsm-slot-badge) {
  flex-direction: column;
  align-items: flex-start !important;
  gap: 8px;
}

.tsm-meta-row.tsm-meta-row-timings .tsm-meta-right,
.tsm-meta-row:has(.tsm-slot-badge) .tsm-meta-right {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: flex-start !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 8px !important;
}

/* Pill badges inside meta-right */
.tsm-meta-right .tsm-badge-pill-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  font-weight: 700;
  display: inline-block;
}

.tsm-meta-right .tsm-badge-pill-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-block;
}

/* Terms & conditions */
.tsm-terms-container {
  background: #fffdfa;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 14px;
  flex: 1;
  overflow: hidden;
  display: flex;
  box-sizing: border-box;
}

.tsm-terms-scroll {
  font-size: 12.5px;
  color: #451a03;
  line-height: 1.6;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 8px;
  width: 100%;
}

.tsm-terms-scroll::-webkit-scrollbar { width: 5px; }
.tsm-terms-scroll::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 4px; }

.tsm-terms-scroll ol {
  padding-left: 18px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tsm-terms-scroll ol li { padding-left: 4px; }
.tsm-terms-scroll ol li strong { color: #78350f; }

/* Marquee banner */
.tsm-marquee-bar {
  position: relative;
  white-space: nowrap;
  padding: 9px 0;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.tsm-marquee-item {
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #ffffff;
}

.tsm-marquee-blocked {
  background: linear-gradient(90deg, #7f1d1d 0%, #b91c1c 50%, #dc2626 100%);
}

.tsm-marquee-blocked .tsm-marquee-item i {
  color: #fecaca;
  font-size: 14px;
}

.tsm-marquee-blocked .tsm-marquee-item strong {
  color: #fef08a;
  font-weight: 800;
}

.tsm-marquee-bar marquee {
  color: #ffffff;
  display: block;
  margin: 0;
  padding: 0;
}

.tsm-marquee-bar.tsm-marquee-blocked {
  margin: 12px 16px 4px 16px;
  border-radius: 8px;
  overflow: hidden;
}

/* Demo page background */
.showcase-bg {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
}

/* =========================================================
   7. MOBILE VIEW (≤ 768px)
   ========================================================= */
@media (max-width: 768px) {

  /* Dialog & content */
  #savedAddressModal .modal-dialog,
  #serviceDetailsModal .modal-dialog,
  .tsm-modal-scope .modal-dialog {
    margin: 10px auto;
    width: 95% !important;
    max-width: 95% !important;
  }

  #savedAddressModal .modal-dialog-scrollable .modal-content,
  #serviceDetailsModal .modal-dialog-scrollable .modal-content,
  .tsm-modal-scope .modal-dialog-scrollable .modal-content {
    max-height: 92vh;
    border-radius: 16px !important;
  }

  /* Header */
  .tsm-xl-header {
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "title close"
      "price price";
    row-gap: 12px;
  }

  .tsm-header-left-box { grid-area: title; }
  .tsm-header-right-actions { display: contents; }

  .tsm-header-close-btn {
    grid-area: close;
    justify-self: end;
    width: 34px;
    height: 34px;
  }

  .tsm-header-price-badge {
    grid-area: price;
    width: 100%;
    justify-content: space-between;
    padding: 7px 14px;
  }

  .tsm-header-badge-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .tsm-header-title { font-size: 16px; }

  /* Body - padding at bottom prevents sticky elements from cutting content */
  .tsm-xl-body {
    padding: 14px 14px 28px 14px;
  }

  /* Saved Address */
  .tsm-address-grid { grid-template-columns: 1fr; }

  /* Service Details */
  .tsm-fixed-box {
    height: auto !important;
    min-height: unset !important;
  }

  .tsm-meta-table {
    overflow-y: visible;
    padding-right: 0;
  }

  .tsm-terms-container {
    max-height: 220px;
    margin-bottom: 4px;
  }

  .tsm-meta-row { padding: 9px 12px; }

  .tsm-meta-left,
  .tsm-meta-right { font-size: 12.5px; }

  /* Marquee placement on mobile */
  .tsm-marquee-bar.tsm-marquee-blocked {
    margin: 10px 4px 6px 4px;
    border-radius: 8px;
  }

  /* Footer */
  .tsm-xl-footer {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .tsm-footer-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 9px 12px;
    border-radius: 8px;
  }

  .tsm-footer-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .tsm-footer-btn {
    flex: 1;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
  }
}