* { box-sizing: border-box; }

.widget-root {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  overflow: hidden;
  color: #1b2430;
}

.widget-header {
  background: #7a0c2e;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand-msrtc { font-weight: 700; letter-spacing: 0.5px; font-size: 18px; }
.brand-sep { margin: 0 8px; opacity: 0.6; }
.brand-sub { font-size: 15px; opacity: 0.9; }
.powered-by { font-size: 12px; opacity: 0.85; }

.step-indicator {
  display: flex;
  background: #f6f7f9;
  border-bottom: 1px solid #e2e6ea;
  padding: 10px 16px;
  gap: 6px;
  overflow-x: auto;
}
.step {
  font-size: 12px;
  color: #8a94a3;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 8px;
}
.step span {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #d9dee5;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.step.active { color: #7a0c2e; font-weight: 600; }
.step.active span { background: #7a0c2e; }
.step.done span { background: #2e8b57; }
.step em { font-style: normal; }

.screen { display: none; padding: 22px 24px 28px; }
.screen.active { display: block; }

h2 { margin: 0 0 4px; font-size: 20px; }
h3 { font-size: 14px; margin: 18px 0 8px; color: #47536a; }
.muted { color: #6b7688; font-size: 13.5px; margin: 0 0 16px; }
.muted.small { font-size: 12.5px; }

.form-grid { display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #33404f; }
.form-grid input, .form-grid select {
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #cdd4dd;
  border-radius: 6px;
  font-weight: 400;
}
.form-grid input:focus, .form-grid select:focus { outline: none; border-color: #7a0c2e; }

.mobile-input-group { display: flex; }
.mobile-prefix {
  display: flex; align-items: center; padding: 10px 10px; font-size: 14px; font-weight: 600;
  color: #33404f; background: #f6f7f9; border: 1px solid #cdd4dd; border-right: none;
  border-radius: 6px 0 0 6px;
}
.mobile-input-group input {
  flex: 1; min-width: 0; border-radius: 0 6px 6px 0;
}
.mobile-input-group input:focus { border-left: 1px solid #7a0c2e; }

.btn {
  border: none;
  border-radius: 6px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}
.btn-primary { background: #7a0c2e; color: #fff; }
.btn-primary:hover { background: #5f0922; }
.btn-ghost { background: #fff; color: #7a0c2e; border: 1px solid #7a0c2e; }
.btn-ghost:hover { background: #f8f0f3; }
.btn-link { background: none; color: #7a0c2e; padding: 4px 0; margin-bottom: 10px; text-decoration: underline; font-size: 13px; }
.btn-back::before { content: "\2190\00a0"; text-decoration: none; display: inline-block; }
.btn-generate { margin-top: 20px; }
.btn:disabled, .btn-disabled { opacity: 0.5; cursor: not-allowed; }
.form-error { color: #c0392b; font-size: 13px; min-height: 16px; }
.field-hint { font-size: 12px; font-weight: 400; color: #6b7688; }
.field-error { font-size: 12.5px; font-weight: 600; color: #c0392b; margin-top: -2px; }
.field-error:empty { display: none; }
.form-grid input.invalid { border-color: #c0392b; background: #fff8f7; }
.mobile-input-group.invalid .mobile-prefix { border-color: #c0392b; }

/* Language selection */
.lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; margin-top: 18px; }
.lang-card {
  background: #fff; border: 2px solid #e2e6ea; border-radius: 10px;
  padding: 22px 14px; text-align: center; cursor: pointer; font-family: inherit;
}
.lang-card:hover { border-color: #7a0c2e; }
.lang-card.selected { border-color: #7a0c2e; background: #f8f0f3; }
.lang-native { font-size: 19px; font-weight: 700; color: #33404f; margin-bottom: 4px; }
.lang-name { font-size: 12px; color: #8a94a3; }
.lang-continue-btn { margin-top: 22px; }

.rules-block {
  margin-top: 26px; max-width: 620px; background: #f8f9fb;
  border: 1px solid #e6e9ee; border-radius: 10px; padding: 16px 20px;
}
.rules-block h3 { margin-top: 0; color: #7a0c2e; font-size: 14.5px; }
.rules-block ul { margin: 0; padding-left: 20px; }
.rules-block li { font-size: 13px; color: #33404f; line-height: 1.6; margin-bottom: 6px; }
.rules-block li:last-child { margin-bottom: 0; }

.pricing-block {
  margin-top: 18px; text-align: left; background: #f8f9fb;
  border: 1px solid #e6e9ee; border-radius: 10px; padding: 16px 20px;
}
.pricing-block h3 { margin-top: 0; color: #7a0c2e; font-size: 14px; }
.pricing-line { font-size: 13px; color: #33404f; font-weight: 600; margin: 0 0 8px; }
.pricing-warning { color: #a54a00; font-size: 12.5px; font-weight: 600; margin: 0; }

/* Locate depot tabs */
.locate-tabs { display: flex; gap: 4px; border-bottom: 1px solid #e2e6ea; margin-bottom: 16px; }
.locate-tab-btn {
  background: none; border: none; font-family: inherit; cursor: pointer;
  padding: 9px 4px; margin-right: 22px; font-size: 13.5px; font-weight: 600;
  color: #8a94a3; border-bottom: 2px solid transparent;
}
.locate-tab-btn.active { color: #7a0c2e; border-bottom-color: #7a0c2e; }
.locate-panel { display: none; }
.locate-panel.active { display: block; }

.master-search-input {
  width: 100%; max-width: 520px; font-size: 14px; padding: 10px 12px;
  border: 1px solid #cdd4dd; border-radius: 6px; margin-bottom: 12px;
}
.master-list { max-height: 440px; overflow-y: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

.save-time-note { margin: 8px 0 0; font-size: 12.5px; color: #2e8b57; font-weight: 600; }

.search-bar { display: flex; gap: 8px; max-width: 640px; margin-bottom: 6px; flex-wrap: wrap; }
.search-bar input { flex: 1; min-width: 200px; font-size: 14px; padding: 10px 12px; border: 1px solid #cdd4dd; border-radius: 6px; }
.search-status { font-size: 12.5px; color: #6b7688; min-height: 18px; margin: 4px 0 12px; }
.search-status.error { color: #c0392b; }
.search-status.warning { color: #a56a00; }

.no-agent-notice {
  background: #fff6e8; border: 1px solid #f0d3a6; border-left: 4px solid #a54a00;
  border-radius: 6px; padding: 10px 14px; color: #5c3300; max-width: 640px;
}
.no-agent-notice strong { display: block; font-size: 13.5px; color: #a54a00; margin-bottom: 4px; }
.no-agent-notice p { margin: 0; font-size: 13px; line-height: 1.5; }
.no-agent-notice p.no-agent-extra { margin-top: 6px; font-weight: 600; }
.selected-location-info.no-agent .no-agent-notice { max-width: none; }

.district-taluka-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.district-taluka-bar .or-divider { font-size: 12.5px; color: #8a94a3; }
.district-taluka-bar select {
  font-size: 13.5px; padding: 8px 10px; border: 1px solid #cdd4dd; border-radius: 6px;
}
.district-taluka-bar select:disabled { background: #f6f7f9; color: #b0b8c2; }

.selected-location-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; background: #f8f9fb; border: 1px solid #e6e9ee; border-radius: 8px;
  padding: 10px 14px; margin: 0 0 16px;
}
.selected-location-info { font-size: 13px; color: #33404f; flex: 1; min-width: 220px; }
.selected-location-bar .btn { margin: 0; }

.map-layout { display: flex; gap: 16px; align-items: flex-start; }
#map { height: 420px; flex: 1.4; border-radius: 8px; border: 1px solid #dde2e8; z-index: 0; }
.depot-list-panel { flex: 1; height: 420px; display: flex; flex-direction: column; }
.depot-list { flex: 1; overflow-y: auto; border: 1px solid #dde2e8; border-radius: 8px; padding: 8px; }
.depot-list-empty { color: #8a94a3; font-size: 13px; padding: 12px; }
.depot-card {
  padding: 10px 12px;
  border: 1px solid #e6e9ee;
  border-radius: 6px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s;
}
.depot-card:hover { border-color: #7a0c2e; }
.depot-card.selected { border-color: #7a0c2e; border-width: 2px; background: #f8f0f3; }
.depot-card .name { font-weight: 600; font-size: 13.5px; }
.depot-card .dist { font-size: 12px; color: #2e8b57; font-weight: 600; }
.depot-card .addr { font-size: 12px; color: #6b7688; margin-top: 2px; }

.confirm-box { max-width: 460px; margin: 0 auto; text-align: center; }
.confirm-tick {
  width: 56px; height: 56px; line-height: 56px;
  background: #2e8b57; color: #fff; border-radius: 50%;
  font-size: 28px; margin: 0 auto 14px;
}
.token-number {
  font-size: 24px; font-weight: 700; color: #7a0c2e;
  background: #f8f0f3; border: 1px dashed #7a0c2e;
  border-radius: 8px; padding: 10px; margin: 10px 0 18px;
}
.confirm-table { width: 100%; border-collapse: collapse; text-align: left; margin-bottom: 16px; }
.confirm-table td { padding: 6px 4px; font-size: 13.5px; border-bottom: 1px solid #eef0f3; }
.confirm-table td:first-child { color: #6b7688; width: 45%; }

.free-cost-note {
  background: #eef8f1; color: #206040; border: 1px solid #cfead9;
  border-radius: 6px; padding: 10px 12px; font-size: 13px; max-width: 460px;
}
.statewide-banner {
  background: #f8f0f3; color: #7a0c2e; border: 1px solid #e6c3cd;
  border-radius: 6px; padding: 12px 14px; font-size: 13px; font-weight: 600;
  text-align: left; margin-top: 18px;
}

.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.confirm-actions .btn { margin: 0; }

.nearby-agents-block { max-width: 700px; margin: 26px auto 0; text-align: left; }
.nearby-agents-block h3 { text-align: center; }
.nearby-agents-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.nearby-agent-card {
  padding: 10px 12px; border: 1px solid #e6e9ee; border-radius: 6px; background: #f8f9fb;
}
.nearby-agent-card .name { font-weight: 600; font-size: 13px; }
.nearby-agent-card .name .dist { font-weight: 400; color: #2e8b57; font-size: 12px; }
.nearby-agent-card .addr { font-size: 12px; color: #6b7688; margin: 3px 0; }

.selected-location-block {
  text-align: left; background: #f8f0f3; border: 1px solid #e6c3cd;
  border-radius: 10px; padding: 14px 18px; margin-bottom: 14px;
}
.selected-location-block h3 { margin-top: 0; color: #7a0c2e; font-size: 14px; }
.selected-location-name { font-weight: 700; font-size: 14px; color: #1b2430; }
.selected-location-addr { font-size: 13px; color: #47536a; margin-top: 4px; line-height: 1.5; }

.need-help-block {
  max-width: 460px; margin: 0 auto 16px; text-align: left;
  background: #f8f9fb; border: 1px solid #e6e9ee; border-radius: 10px; padding: 16px 20px;
}
.need-help-block h3 { margin-top: 0; color: #7a0c2e; font-size: 14.5px; }
.location-help-note {
  margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: #206040;
  background: #eef8f1; border: 1px solid #cfead9; border-radius: 6px; padding: 10px 12px;
}
a.need-help-value { text-decoration: none; }
a.need-help-value:hover { color: #7a0c2e; text-decoration: underline; }
.need-help-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #eef0f3; font-size: 13.5px;
}
.need-help-row:last-child { border-bottom: none; }
.need-help-label { color: #6b7688; }
.need-help-value { font-weight: 700; color: #1b2430; }

.leaflet-popup-content { font-size: 13px; }

@media (max-width: 720px) {
  .map-layout { flex-direction: column; }
  #map { width: 100%; }
  .depot-list-panel { width: 100%; }
  .lang-grid { grid-template-columns: 1fr; }
  .master-list { grid-template-columns: 1fr; }
}

/* CAPTCHA (Cloudflare Turnstile) - empty and zero-height when switched off */
.captcha-box { margin: 4px 0 2px; min-height: 0; }
