/* ==========================================================================
   भक्ति Vilas, welcome / sign-in dialog
   Hand-written CSS on purpose: the Tailwind CDN build only emits rules for
   classes present at its initial scan, so anything toggled by JS must not
   depend on utility classes.
   ========================================================================== */

.bv-auth, .bv-auth * { box-sizing: border-box; }

/* ---------- backdrop ----------
   The entrance is a CSS animation, not a JS-toggled transition: animations
   start on their own the moment the element is displayed, so the dialog can
   never be left stuck at opacity 0 if a frame callback fails to run. */
@keyframes bvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes bvRise {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.bv-auth {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(30, 27, 24, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.bv-auth[data-open] {
  display: flex;
  animation: bvFadeIn 0.22s ease both;
}

/* ---------- dialog shell ---------- */
.bv-auth__dialog {
  position: relative;
  width: 100%;
  max-width: 940px;
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: #fff8f5;
  border-radius: 16px;
  box-shadow: 0 32px 80px -20px rgba(60, 3, 12, 0.45);
}
.bv-auth[data-open] .bv-auth__dialog {
  animation: bvRise 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---------- close ---------- */
.bv-auth__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  /* Sits over the cream panel on desktop and over the photo on mobile,
     so it needs to read against both. */
  color: #3c030c;
  background: rgba(255, 248, 245, 0.88);
  border: 1px solid rgba(60, 3, 12, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  font-size: 17px;
  line-height: 1;
  transition: background 0.2s ease;
}
.bv-auth__close:hover { background: #f5ece7; }
.bv-auth__close:focus-visible { outline: 2px solid #3c030c; outline-offset: 2px; }

/* ==========================================================================
   LEFT, the welcome panel
   ========================================================================== */
.bv-auth__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 22px;
  min-height: 540px;
  padding: 36px 34px 34px;
  color: #fff8f5;
  background-image:
    linear-gradient(
      to bottom,
      rgba(44, 2, 9, 0.74) 0%,
      rgba(60, 3, 12, 0.70) 32%,
      rgba(52, 3, 10, 0.84) 64%,
      rgba(38, 2, 8, 0.95) 100%
    ),
    url('tea-circle.jpg');
  background-size: cover;
  background-position: 62% center;
}

.bv-auth__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 248, 245, 0.72);
}
.bv-auth__eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 248, 245, 0.28);
}

.bv-auth__greeting {
  margin: 0;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 34px;
  line-height: 1.18;
  font-weight: 600;
  text-wrap: balance;
}
.bv-auth__greeting em {
  font-style: normal;
  color: #ffdada;
}

/* --- thought for the day --- */
.bv-auth__thought {
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid rgba(255, 218, 218, 0.42);
}
.bv-auth__thought-label {
  display: block;
  margin-bottom: 9px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 248, 245, 0.62);
}
.bv-auth__shloka {
  margin: 0 0 6px;
  font-family: "Gotu", "Libre Caslon Text", serif;
  font-size: 19px;
  line-height: 1.5;
  color: #ffdada;
}
.bv-auth__translit {
  margin: 0 0 8px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 12.5px;
  font-style: italic;
  letter-spacing: 0.01em;
  color: rgba(255, 248, 245, 0.58);
}
.bv-auth__meaning {
  margin: 0;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255, 248, 245, 0.94);
}
.bv-auth__source {
  display: block;
  margin-top: 7px;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(255, 248, 245, 0.5);
}

/* --- upcoming event --- */
.bv-auth__event {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 248, 245, 0.22);
  border-radius: 12px;
  background: rgba(255, 248, 245, 0.11);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.bv-auth__date {
  flex: 0 0 auto;
  width: 52px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 248, 245, 0.22);
  text-align: center;
  font-family: Manrope, system-ui, sans-serif;
}
.bv-auth__date b {
  display: block;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 27px;
  line-height: 1;
  font-weight: 600;
}
.bv-auth__date span {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 248, 245, 0.66);
}
.bv-auth__event-body { min-width: 0; font-family: Manrope, system-ui, sans-serif; }
.bv-auth__event-kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 248, 245, 0.6);
}
.bv-auth__event-title {
  margin: 3px 0 4px;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.25;
}
.bv-auth__event-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 248, 245, 0.8);
}
.bv-auth__going {
  display: inline-block;
  margin-top: 7px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 218, 218, 0.16);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffdada;
}

/* ==========================================================================
   RIGHT, sign in
   ========================================================================== */
.bv-auth__main {
  display: flex;
  flex-direction: column;
  padding: 40px 38px 34px;
  font-family: Manrope, system-ui, sans-serif;
  color: #1e1b18;
}

.bv-auth__brand {
  margin: 0 0 26px;
  font-family: "Gotu", "Libre Caslon Text", serif;
  font-size: 25px;
  font-weight: 400;
  color: #3c030c;
}

.bv-auth__step { display: none; flex-direction: column; flex: 1; }
.bv-auth__step[data-active] { display: flex; }

.bv-auth__title {
  margin: 0 0 8px;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  color: #3c030c;
}
.bv-auth__sub {
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.6;
  color: #544343;
}
.bv-auth__sub b { color: #3c030c; font-weight: 600; }

.bv-auth__label {
  display: block;
  margin-bottom: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #544343;
}

/* --- phone field --- */
.bv-auth__phone {
  display: flex;
  align-items: stretch;
  height: 58px;
  border: 1.5px solid #d9c1c1;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.bv-auth__phone:focus-within {
  border-color: #3c030c;
  box-shadow: 0 0 0 4px rgba(60, 3, 12, 0.1);
}
.bv-auth__cc {
  display: grid;
  place-items: center;
  padding: 0 15px;
  border-right: 1.5px solid #e9dcdc;
  background: #fbf2ed;
  font-size: 16px;
  font-weight: 600;
  color: #544343;
}
.bv-auth__phone input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 15px;
  background: transparent;
  font-family: inherit;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: #1e1b18;
}
.bv-auth__phone input::placeholder { color: #b3a3a3; letter-spacing: 0.04em; }

.bv-auth__hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #867272;
}

/* --- otp --- */
.bv-auth__otp {
  display: flex;
  gap: 12px;
}
.bv-auth__otp input {
  width: 100%;
  height: 66px;
  border: 1.5px solid #d9c1c1;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
  font-family: "Libre Caslon Text", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: #3c030c;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.bv-auth__otp input:focus {
  border-color: #3c030c;
  box-shadow: 0 0 0 4px rgba(60, 3, 12, 0.1);
}
.bv-auth__otp input[data-filled] { background: #fbf2ed; }

.bv-auth__resend {
  margin: 14px 0 0;
  font-size: 13px;
  color: #867272;
}

/* --- actions --- */
.bv-auth__spacer { flex: 1; min-height: 26px; }

.bv-auth__submit {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 999px;
  background: #3c030c;
  color: #ffffff;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.12s ease;
}
.bv-auth__submit:hover:not(:disabled) { opacity: 0.9; }
.bv-auth__submit:active:not(:disabled) { transform: scale(0.985); }
.bv-auth__submit:disabled { opacity: 0.34; cursor: not-allowed; }
.bv-auth__submit:focus-visible { outline: 2px solid #3c030c; outline-offset: 3px; }

.bv-auth__alt {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: #544343;
}
.bv-auth__link {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #3c030c;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(60, 3, 12, 0.3);
}
.bv-auth__link:hover { text-decoration-color: #3c030c; }

.bv-auth__trust {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #eadfda;
  font-size: 12px;
  line-height: 1.5;
  color: #867272;
}

/* --- feedback on the last session --- */
.bv-auth__rate {
  display: flex; align-items: center; gap: 13px; width: 100%;
  margin-bottom: 9px; padding: 12px 14px;
  border: 1.5px solid #d9c1c1; border-radius: 12px;
  background: #ffffff; cursor: pointer; text-align: left;
  font-family: inherit;
  transition: border-color .16s ease, background .16s ease;
}
.bv-auth__rate:hover { border-color: rgba(60, 3, 12,.32); }
.bv-auth__rate[data-selected] { border-color: #3c030c; background: #fbf2ed; }
.bv-auth__rate .material-symbols-outlined { font-size: 26px; color: #3c030c; }
.bv-auth__rate b { display: block; font-size: 15px; color: #1e1b18; }
.bv-auth__rate em { display: block; margin-top: 1px; font-size: 12.5px; font-style: normal; color: #867272; }

/* --- buddy suggestion --- */
.bv-auth__buddy {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid #3c030c; border-radius: 13px;
  background: #fbf2ed;
}
.bv-auth__buddy img {
  width: 54px; height: 54px; border-radius: 999px; object-fit: cover;
  border: 2px solid #fff;
}
.bv-auth__buddy b { display: block; font-size: 16px; color: #3c030c; }
.bv-auth__buddy em { display: block; margin-top: 2px; font-size: 12.5px; font-style: normal; color: #867272; }

/* --- success --- */
.bv-auth__done { text-align: center; margin: auto 0; }
.bv-auth__tick {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #3c030c;
  color: #ffdada;
  font-size: 30px;
  line-height: 1;
}

/* ==========================================================================
   Responsive, stack, and turn the welcome panel into a banner
   ========================================================================== */
@media (max-width: 860px) {
  .bv-auth { padding: 0; }
  .bv-auth__dialog {
    grid-template-columns: 1fr;
    max-width: 560px;
    max-height: 100vh;
    border-radius: 0;
  }
  .bv-auth__aside {
    min-height: 0;
    gap: 16px;
    padding: 28px 24px 26px;
    background-position: 60% 30%;
  }
  .bv-auth__greeting { font-size: 27px; }
  .bv-auth__shloka { font-size: 17px; }
  .bv-auth__main { padding: 28px 24px 26px; }
  .bv-auth__spacer { min-height: 20px; }
}

@media (min-width: 561px) and (max-width: 860px) {
  .bv-auth { padding: 24px; }
  .bv-auth__dialog { border-radius: 16px; max-height: calc(100vh - 48px); }
}

@media (prefers-reduced-motion: reduce) {
  .bv-auth[data-open].bv-auth[data-open] .bv-auth__dialog { animation: none; }
}
