/* YognikShala Program Finder — Dedicated Stylesheet
   Location: /yoga1/pfinder/style.css
   Layout: WhatsApp-style single chat column with responsive cards
*/

:root {
  --bg: #FBF6EC;
  --surface: #FFFFFF;
  --ink: #1F2E2D;
  --muted: #5A6866;
  --line: #E7DFCF;
  --teal: #1E4D4B;
  --teal-2: #2F7A74;
  --saffron: #D9822B;
  --saffron-soft: #FCEBD3;
  --bot: #FFFFFF;
  --me: #1E4D4B;
  --me-ink: #FFFFFF;
  --chip: #FFFFFF;
  --chip-line: #D8CDB6;
  --good: #2F7A55;
  --display: "Literata", Georgia, serif;
  --body: "Mukta", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121A19;
    --surface: #1A2423;
    --ink: #EDE7DA;
    --muted: #A6B2AF;
    --line: #2B3836;
    --teal: #7FC4BB;
    --teal-2: #5FAEA5;
    --saffron: #F0A957;
    --saffron-soft: #3A2C19;
    --bot: #1E2928;
    --me: #2F7A74;
    --me-ink: #FFFFFF;
    --chip: #1E2928;
    --chip-line: #3A4A47;
    --good: #7CC7A0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #121A19;
  --surface: #1A2423;
  --ink: #EDE7DA;
  --muted: #A6B2AF;
  --line: #2B3836;
  --teal: #7FC4BB;
  --teal-2: #5FAEA5;
  --saffron: #F0A957;
  --saffron-soft: #3A2C19;
  --bot: #1E2928;
  --me: #2F7A74;
  --me-ink: #FFFFFF;
  --chip: #1E2928;
  --chip-line: #3A4A47;
  --good: #7CC7A0;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

[hidden]:not([hidden=until-found i]) {
  display: none !important;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding-block: 28px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--teal);
  display: grid;
  place-items: center;
  flex: none;
}

.logo svg {
  width: 30px;
  height: 30px;
}

header h1 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

#chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
}

.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 18px;
  animation: in 0.25s ease both;
}

.bot {
  background: var(--bot);
  border: 1px solid var(--line);
  border-top-left-radius: 6px;
  align-self: flex-start;
}

.me {
  background: var(--me);
  color: var(--me-ink);
  border-top-right-radius: 6px;
  align-self: flex-end;
  font-weight: 600;
}

.msg b {
  font-weight: 700;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
}

.choice {
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--chip);
  border: 1.5px solid var(--chip-line);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s;
}

.choice:hover {
  border-color: var(--teal-2);
  transform: translateY(-1px);
}

.choice:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

.choice small {
  display: block;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.card {
  align-self: stretch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  animation: in 0.3s ease both;
}

.card.top {
  border: 2px solid var(--saffron);
}

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--saffron);
}

.prog {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex: none;
  font-variant-numeric: tabular-nums;
}

.prog h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.2;
}

.one {
  font-weight: 700;
  margin: 8px 0 2px;
}

.why {
  color: var(--saffron);
  font-style: italic;
  font-weight: 600;
  margin: 0;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 11px;
  background: var(--saffron-soft);
  color: var(--ink);
}

.pill.lv {
  background: var(--teal);
  color: var(--bg);
}

.reason {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--teal-2) 12%, transparent);
  font-size: 0.95rem;
}

.price {
  margin-top: 12px;
  font-weight: 700;
}

.price span {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.9rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  border: 0;
}

.btn.wa {
  background: var(--teal);
  color: var(--bg);
}

.btn.ghost {
  background: transparent;
  border: 1.5px solid var(--chip-line);
  color: var(--ink);
}

.btn:focus-visible {
  outline: 3px solid var(--saffron);
  outline-offset: 2px;
}

.incl {
  align-self: stretch;
  border-radius: 18px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--teal-2) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--teal-2) 30%, transparent);
  color: var(--ink);
}

.incl h4 {
  color: var(--teal);
  margin: 0 0 8px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.85;
}

.incl ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.incl li {
  font-weight: 600;
}

.small {
  color: var(--muted);
  font-size: 0.88rem;
}

.numtxt {
  font-weight: 700;
  user-select: all;
}

.card.rec {
  border-style: dashed;
  border-color: var(--teal-2);
}

.tag.rt {
  color: var(--teal-2);
}

.btn.view {
  background: var(--saffron);
  color: #fff;
}

/* Step 1 Inline Lead Capture & Searchable Country Code Selector */
.choice.selected-region {
  background: var(--teal);
  color: #ffffff;
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(30, 77, 75, 0.22);
}

.choice.selected-region small {
  color: rgba(255, 255, 255, 0.85);
}

.pf-lead-inline-card {
  align-self: stretch;
  background: var(--surface);
  border: 1.5px solid var(--teal-2);
  border-radius: 18px;
  padding: 18px 20px;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(30, 77, 75, 0.08);
  animation: in 0.25s ease both;
}

.pf-lead-inline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.pf-lead-inline-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.pf-lead-region-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--saffron-soft);
  color: var(--ink);
}

.pf-lead-field-group {
  margin-bottom: 14px;
}

.pf-lead-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.pf-lead-input {
  width: 100%;
  font: inherit;
  font-size: 0.96rem;
  padding: 10px 14px;
  border-radius: 11px;
  border: 1.5px solid var(--chip-line);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-lead-input:focus {
  border-color: var(--teal-2);
  box-shadow: 0 0 0 3px rgba(47, 122, 116, 0.15);
}

.pf-phone-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.pf-cc-fixed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border-radius: 11px;
  border: 1.5px solid var(--chip-line);
  background: var(--saffron-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.93rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Searchable Country Code Picker for Outside India */
.pf-cc-picker-wrap {
  position: relative;
  flex-shrink: 0;
  min-width: 155px;
  max-width: 215px;
}

.pf-cc-trigger {
  width: 100%;
  height: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--chip-line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}

.pf-cc-trigger:hover,
.pf-cc-trigger.open {
  border-color: var(--teal-2);
}

.pf-cc-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pf-cc-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(320px, 86vw);
  background: var(--surface);
  border: 1.5px solid var(--teal-2);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  z-index: 120;
  padding: 10px;
  display: none;
}

.pf-cc-dropdown.open {
  display: block;
  animation: in 0.18s ease both;
}

.pf-cc-search-input {
  width: 100%;
  font: inherit;
  font-size: 0.88rem;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1.5px solid var(--chip-line);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  margin-bottom: 8px;
}

.pf-cc-search-input:focus {
  border-color: var(--teal-2);
}

.pf-cc-list {
  max-height: 215px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pf-cc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.pf-cc-item:hover,
.pf-cc-item.active {
  background: var(--saffron-soft);
  font-weight: 700;
}

.pf-cc-item-code {
  font-weight: 700;
  color: var(--teal);
  flex-shrink: 0;
}

.pf-lead-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}

.pf-lead-error {
  display: none;
  margin-bottom: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid #fecaca;
}

.pf-lead-submit-btn {
  width: 100%;
  justify-content: center;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.98rem;
  padding: 11px 18px;
  border-radius: 12px;
  transition: opacity 0.15s, transform 0.15s;
}

.pf-lead-submit-btn:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .pf-phone-row {
    flex-direction: column;
  }
  .pf-cc-picker-wrap {
    max-width: 100%;
    width: 100%;
  }
  .pf-cc-fixed-badge {
    padding: 9px 13px;
  }
}

@keyframes in {
  from {
    opacity: 0.4;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .msg, .card {
    animation: none;
  }
  .choice {
    transition: none;
  }
}
