/* Sitewide lead-capture UI: the popup modal and the always-visible sticky CTA.
 *
 * Everything inside the modal card (headings, fields, submit button) reuses the theme's
 * existing .wptb-heading / .form-group / .form-control / .wptb-item--button styles,
 * so this file only has to provide the overlay, the card and the close button.
 *
 * Class names are namespaced `bhikshu-` because bootstrap.min.css is loaded on every
 * page and already owns `.modal`.
 */

.bhikshu-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: 20px;
  overflow-y: auto;
}

.bhikshu-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bhikshu-modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.bhikshu-modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 40px 32px 32px;
  border-radius: 16px;
  background: var(--color-dark-one, #ffffff);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  animation: bhikshuModalIn 0.25s ease;
}

@keyframes bhikshuModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bhikshu-modal-card {
    animation: none;
  }
}

.bhikshu-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--color-two, #585858);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.bhikshu-modal-close:hover,
.bhikshu-modal-close:focus-visible {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-one, #4a554d);
}

/* Tighten the reused heading block — it ships with section-level spacing. */
.bhikshu-modal-card .wptb-heading {
  margin-bottom: 26px;
}

.bhikshu-modal-card .wptb-item--title {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.bhikshu-modal-card .wptb-item--description {
  font-size: 15px;
  line-height: 1.6;
}

.bhikshu-modal-alt {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--color-two, #585858);
}

.bhikshu-modal-alt a {
  color: var(--color-one, #4a554d);
  font-weight: var(--fw-semibold, 600);
  text-decoration: underline;
}

/* Success / error banner, shown in place of the form after submit. */
.bhikshu-modal-msg {
  display: none;
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  text-align: center;
  line-height: 1.6;
}

.bhikshu-modal-msg.is-show {
  display: block;
}

.bhikshu-modal-msg.is-err {
  border-color: rgba(200, 40, 40, 0.35);
  background: rgba(200, 40, 40, 0.05);
}

body.bhikshu-modal-open {
  overflow: hidden;
}

@media (max-width: 575px) {
  .bhikshu-modal {
    padding: 12px;
  }

  .bhikshu-modal-card {
    padding: 36px 20px 24px;
  }

  .bhikshu-modal-card .wptb-item--title {
    font-size: 23px;
  }
}

/* ------------------------------------------------------------------ *
 * Sticky CTA — WhatsApp / Call / Book, on every page.
 *
 * Ad traffic lands deep in the site (a style page, piercing, an offer), so the
 * conversion path has to follow the visitor down the page rather than living
 * only in the hero. Phone-width traffic gets a full-width bottom bar because
 * thumb-reach beats a corner bubble; desktop gets the corner stack.
 * ------------------------------------------------------------------ */

.bhikshu-cta-bar {
  position: fixed;
  z-index: 9000;
  display: flex;
}

.bhikshu-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  text-decoration: none;
  font-family: var(--font-family-base, "Sora", sans-serif);
  font-weight: var(--fw-semibold, 600);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.bhikshu-cta i {
  font-size: 20px;
  line-height: 1;
}

.bhikshu-cta--wa   { background: #25d366; color: #fff; }
.bhikshu-cta--call { background: #4a554d; color: #fff; }
.bhikshu-cta--book { background: #1c1c1c; color: #fff; }

.bhikshu-cta:hover,
.bhikshu-cta:focus-visible {
  color: #fff;
  filter: brightness(1.08);
}

/* --- phone: full-width bar pinned to the bottom --- */
@media (max-width: 991px) {
  .bhikshu-cta-bar {
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.22);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bhikshu-cta {
    flex: 1 1 0;
    flex-direction: column;
    gap: 3px;
    padding: 10px 4px;
    font-size: 12px;
    letter-spacing: 0.02em;
  }

  .bhikshu-cta i { font-size: 19px; }

  /* Keep the bar from covering the last of the footer. */
  body { padding-bottom: 66px; }
}

/* --- desktop: corner stack --- */
@media (min-width: 992px) {
  .bhikshu-cta-bar {
    right: 22px;
    bottom: 22px;
    flex-direction: column;
    gap: 12px;
  }

  .bhikshu-cta {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  }

  .bhikshu-cta:hover { transform: scale(1.07); }

  /* Label slides out on hover — no permanent clutter. */
  .bhikshu-cta span {
    position: absolute;
    right: 68px;
    white-space: nowrap;
    background: #1c1c1c;
    color: #fff;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .bhikshu-cta { position: relative; }
  .bhikshu-cta:hover span,
  .bhikshu-cta:focus-visible span { opacity: 1; }

  /* One soft pulse on WhatsApp to draw the eye without flashing. */
  .bhikshu-cta--wa::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: bhikshuRing 2.6s infinite;
  }

  @keyframes bhikshuRing {
    0%   { transform: scale(1);   opacity: 0.7; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .bhikshu-cta--wa::after { animation: none; }
  .bhikshu-cta:hover { transform: none; }
}

/* The modal sits above the bar. */
.bhikshu-modal { z-index: 10000; }
