/* Booking Form
 * UI parity with AEM Classic dishTv/dish-landing-form (prefix dlf- / dish-landing-form__).
 * A black rounded bar pinned to the bottom of the viewport: the OR / missed-call
 * line sits above a row of equal-width fields and the Book Now button.
 * The classic clientlib has a single max-width:649px breakpoint; this is written
 * mobile-first with the equivalent min-width:650px cut-off.
 */

.booking-form {
  position: relative;
}

/* ── Fixed bar (≙ .dish-landing-form__container) ── */
.bf-container {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  gap: 10px;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 16px;
  border: 1px solid #fff;
  border-radius: 10px;
  background-color: #000;
}

/* ── OR + missed-call line (≙ .dish-landing-form__missedcall-text) ── */
.bf-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  margin: 10px auto 0;
  color: #fff;
  font-size: 16px;
  line-height: 16px;
  text-align: center;
}

.bf-text + .bf-text {
  margin-top: 0;
}

.bf-text p {
  margin: 0;
}

.bf-text a,
.bf-text .bf-tel {
  color: #f04c23;
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
}

/* ── Field row (≙ .dish-landing-form__inputs) ── */
.bf-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

/* Fields and the button share the row equally, as in the classic component. */
.bf-field {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.bf-input,
.bf-submit-btn {
  box-sizing: border-box;
  width: 100%;
  height: 45px;
  padding: 10px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
}

.bf-input {
  display: block;
  color: #000;
}

.bf-submit-btn {
  display: inline-block;
  background: linear-gradient(180deg, #e9392e 0%, #ee644f 29%, #e32d24 72%, #bd2b24 100%);
  box-shadow: 0 4px 6px rgb(0 0 0 / 20%);
  color: #fff;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.bf-submit-btn:hover {
  background: linear-gradient(to bottom, #b31217, #e52d27);
  color: #fff;
  transform: translateY(-1px);
}

/* ≙ .dish-landing-form__book-now--disabled */
.bf-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ── 650px+ ── */
@media (width >= 650px) {
  .bf-container {
    gap: 0;
    padding: 10px 16px;
  }

  .bf-text {
    gap: 5px;
    width: 80%;
    margin-top: 4px;
    font-size: 20px;
  }

  .bf-text a,
  .bf-text .bf-tel {
    font-size: 20px;
  }

  /* .bf-text p sets margin: 0 at (0,1,1) specificity — a bare .bf-text-or
     at (0,1,0) can never beat that, so this must stay scoped under .bf-text. */
  .bf-text .bf-text-or {
    margin: 5px;
  }

  .bf-card {
    flex-direction: row;
    gap: 30px;
  }

  .bf-input,
  .bf-submit-btn {
    height: 50px;
    font-size: 18px;
  }

  .bf-submit-btn {
    font-size: 20px;
  }
}

/* ==========================================================================
   Success popup — centered modal, matches the reference thank-you dialog
   ========================================================================== */

.bf-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 45%);
}

.bf-popup {
  width: 90%;
  max-width: 360px;
  padding: 32px 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
  text-align: center;
}

.bf-popup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border: 1px solid #eee;
  border-radius: 50%;
  background: #fff;
}

.bf-popup-icon svg {
  width: 34px;
  height: 34px;
  color: #ef4723;
  fill: none;
  stroke: #ef4723;
}

.bf-popup-message {
  margin: 0 0 24px;
  color: #212529;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.bf-popup-ok {
  display: inline-block;
  min-width: 140px;
  height: 44px;
  padding: 0 24px;
  border: none;
  border-radius: 0.25rem;
  background: #ef4723;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease;
}

.bf-popup-ok:hover {
  background: #d63f10;
}

/* ==========================================================================
   HD upsell popup — south-flow only, before the New Connection redirect
   (≙ AEM's #lp999-hd-modal)
   ========================================================================== */

.bf-hd-popup {
  position: relative;
}

/* Pink circle + black TV/HD icon, overriding the shared white/orange .bf-popup-icon
   used by the thank-you popup — specificity (0,2,1) beats .bf-popup-icon svg's (0,1,1). */
.bf-popup-icon.bf-hd-icon {
  border: none;
  background: #fde9e6;
}

.bf-popup-icon.bf-hd-icon svg {
  width: 44px;
  height: 44px;
  color: #1a1a1a;
  stroke: #1a1a1a;
}

/* Authored icon is already a complete icon+circle graphic — no extra CSS circle
   behind it (that would nest a second circle inside this one), and it fills the
   full 72px popup-icon area instead of the 44px glyph size. */
.bf-popup-icon.bf-hd-icon--custom {
  background: transparent;
}

/* The authored HD Icon image has no intrinsic size guarantee — cap it the same
   as the fallback SVG so a large uploaded source doesn't overflow the circle. */
.bf-popup-icon.bf-hd-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bf-hd-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 20px;
  background: #212529;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Matches AEM's .hd-upsell-badge-star exactly (color/font) so the star renders as a
   plain glyph in this color rather than a browser/OS default (colorful emoji) star. */
.bf-hd-badge-star {
  color: #F04C23;
  font-size: 13px;
  font-family: Roboto, sans-serif;
}

/* ≙ AEM's .lp999-hd-close — dismisses without selecting Continue/Skip. */
.bf-hd-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 23px;
  height: 23px;
  border: none;
  background: transparent;
  color: #888;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.bf-hd-close:hover {
  color: #333;
}

.bf-hd-title {
  margin: 8px 0;
  color: #212529;
  font-size: 18px;
  font-weight: 700;
}

.bf-hd-desc {
  margin: 0 0 24px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.bf-hd-continue {
  display: block;
  width: 100%;
  height: 44px;
  margin-bottom: 10px;
  border: none;
  border-radius: 0.25rem;
  background: #ef4723;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.bf-hd-continue:hover {
  background: #d63f10;
}

.bf-hd-skip {
  display: block;
  width: 100%;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  background: transparent;
  color: #555;
  font-size: 0.9rem;
  cursor: pointer;
}

.bf-hd-skip:hover {
  border-color: #ef4723;
  color: #ef4723;
}

/* ==========================================================================
   campaign-lead flow — bespoke layout, ported from AEM Classic's
   campaignNewConnection/campaignLeadForm (prefix cnlf- / .cnlf-*, renamed
   .bf-cl-* here). Scoped under .bf-cl (added by decorateCampaignLead) so
   none of this affects the default/always-on-activation flows above.
   Classic breakpoints (992px / 768px) kept exact — this is a distinct
   design from the rest of the block, not meant to share its 650px cutoff.
   ========================================================================== */

.booking-form.bf-cl {
  position: static;
}

.bf-cl-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  padding: 24px 0;
  background-color: #1C1C1C;
  box-shadow: 0 -4px 24px rgb(0 0 0 / 35%);
}

.bf-cl-wrapper {
  max-width: 1046px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Form row ── */
.bf-cl-form-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: nowrap;
}

.bf-cl-field-group {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bf-cl-input-wrapper {
  position: relative;
  width: 100%;
}

.bf-cl-input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  line-height: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.bf-cl-input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 16px 0 38px;
  border: 1px solid #D0D0D0;
  border-radius: 6px;
  background-color: #FFF;
  color: rgb(26 26 26);
  font-size: 14px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease;
}

.bf-cl-input::placeholder {
  color: #555;
  font-weight: 400;
}

.bf-cl-select {
  appearance: none;
  padding-right: 36px;
  background-color: #FFF;
  color: #818598;
  cursor: pointer;
}

.bf-cl-select-caret {
  position: absolute;
  top: 50%;
  right: 14px;
  z-index: 1;
  display: flex;
  align-items: center;
  line-height: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.bf-cl-select.bf-cl-select--selected {
  color: rgb(26 26 26);
}

.bf-cl-select option {
  background-color: #FFF;
  color: rgb(26 26 26);
}

.bf-cl-input:focus {
  border-color: #E84B1C;
}

.bf-cl-input.bf-cl-input--error {
  border-color: #F44;
}

.bf-cl-error-msg {
  display: none;
  margin-top: 4px;
  padding-left: 2px;
  color: #FF6B6B;
  font-size: 11px;
  line-height: 1.3;
}

.bf-cl-error-msg.bf-cl-error-msg--visible {
  display: block;
}

.bf-cl-submit-btn {
  flex-shrink: 0;
  align-self: flex-start;
  box-sizing: border-box;
  min-width: 180px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  background-color: #E84B1C;
  color: #FFF;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.bf-cl-submit-btn:hover {
  background-color: #D03F10;
}

.bf-cl-submit-btn:active {
  background-color: #B83610;
}

.bf-cl-submit-btn:disabled {
  background: #ccc;
  opacity: 0.7;
  cursor: not-allowed;
}

/* ── Missed-call line + OR, above the form row ── */
.bf-cl-missedcall {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px;
  color: #FFF;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
}

.bf-cl-missedcall p {
  margin: 0;
}

/* Hidden when unauthored, on the confirm screen, and inside the open mobile sheet. */
.bf-cl-missedcall[hidden],
.bf-cl-wrapper:has(.bf-cl-form-row.bf-cl-hidden) .bf-cl-missedcall {
  display: none;
}

.bf-cl-missedcall .bf-cl-tel {
  color: #F04C23;
  text-decoration: underline;
  white-space: nowrap;
}

/* ── Mobile trigger bar (hidden on desktop) ── */
.bf-cl-mobile-bar {
  display: none;
  align-items: center;
  justify-content: center;
}

.bf-cl-mobile-open-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 6px;
  background-color: #E84B1C;
  color: #FFF;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bf-cl-mobile-open-btn:hover {
  background-color: #D03F10;
}

.bf-cl-mobile-open-btn:active {
  background-color: #B83610;
}

/* ── Responsive ── */
@media (width <= 992px) {
  .bf-cl-form-row {
    flex-wrap: wrap;
  }

  .bf-cl-field-group {
    flex: 1 1 calc(50% - 8px);
    min-width: calc(50% - 8px);
  }

  .bf-cl-submit-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: unset;
  }
}

@media (width <= 768px) {
  .bf-cl-bar {
    padding: 14px 0;
    border-radius: 16px 16px 0 0;
  }

  .bf-cl-wrapper {
    padding: 0 16px;
  }

  .bf-cl-handle {
    display: block;
  }

  .bf-cl-mobile-bar {
    display: flex;
  }

  .bf-cl-form-row {
    max-height: 0;
    overflow: hidden;
    flex-wrap: wrap !important;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.38s ease, opacity 0.28s ease;
  }

  .bf-cl-bar.bf-cl-open {
    padding: 12px 0 20px;
  }

  .bf-cl-bar.bf-cl-open .bf-cl-mobile-bar,
  .bf-cl-bar.bf-cl-open .bf-cl-missedcall {
    display: none;
  }

  .bf-cl-missedcall {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .bf-cl-bar.bf-cl-open .bf-cl-form-row {
    max-height: 720px;
    opacity: 1;
    pointer-events: auto;
  }

  .bf-cl-bar.bf-cl-open .bf-cl-mobile-header {
    display: flex;
  }

  .bf-cl-field-group {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .bf-cl-submit-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: unset;
  }
}

/* ── Sheet drag handle (mobile only) ── */
.bf-cl-handle {
  flex-shrink: 0;
  display: none;
  width: 40px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 2px;
  background: rgb(255 255 255 / 25%);
}

/* ── Mobile sheet header (title + close), shown only while open ── */
.bf-cl-mobile-header {
  flex: 1 1 100%;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 14px;
}

.bf-cl-mobile-title {
  margin: 0;
  color: #FFF;
  font-size: 15px;
  font-weight: 600;
}

.bf-cl-mobile-close-btn,
.bf-cl-confirm-close-btn,
.bf-cl-verify-close-btn {
  padding: 4px 6px;
  border: none;
  border-radius: 4px;
  background: none;
  color: rgb(255 255 255 / 75%);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease;
}

.bf-cl-mobile-close-btn:hover,
.bf-cl-confirm-close-btn:hover {
  color: #FFF;
}

/* ── Mobile backdrop ── */
.bf-cl-backdrop {
  position: fixed;
  z-index: 999;
  display: none;
  inset: 0;
  background: rgb(0 0 0 / 55%);
  -webkit-tap-highlight-color: transparent;
}

.bf-cl-backdrop.bf-cl-show {
  display: block;
  animation: bf-cl-backdrop-fade-in 0.25s ease;
}

@keyframes bf-cl-backdrop-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Confirmation screen ── */
.bf-cl-form-row.bf-cl-hidden {
  display: none !important;
}

.bf-cl-confirm-screen {
  display: none;
  flex-direction: column;
  width: 100%;
}

.bf-cl-confirm-screen.bf-cl-visible {
  display: flex;
}

.bf-cl-confirm-header {
  display: none;
}

.bf-cl-confirm-body {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.bf-cl-confirm-text {
  flex: 1;
  margin: 0;
  color: #FFF;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.bf-cl-confirm-number {
  font-weight: 700;
}

.bf-cl-confirm-actions {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
}

.bf-cl-edit-btn {
  height: 48px;
  min-width: 100px;
  padding: 0 20px;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 6px;
  background: transparent;
  color: #FFF;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.bf-cl-edit-btn:hover {
  border-color: rgb(255 255 255 / 70%);
  background-color: rgb(255 255 255 / 6%);
}

.bf-cl-confirm-btn {
  height: 48px;
  min-width: 160px;
  padding: 0 24px;
  border: none;
  border-radius: 6px;
  background-color: #E84B1C;
  color: #FFF;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.bf-cl-confirm-btn:hover {
  background-color: #D03F10;
}

.bf-cl-confirm-btn:active {
  background-color: #B83610;
}

@media (width <= 768px) {
  .bf-cl-confirm-header {
    flex: 1 1 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 16px;
  }

  .bf-cl-confirm-body {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .bf-cl-confirm-text {
    text-align: center;
    font-size: 15px;
  }

  .bf-cl-confirm-actions {
    flex-direction: column;
    gap: 10px;
  }

  .bf-cl-edit-btn,
  .bf-cl-confirm-btn {
    width: 100%;
    min-width: unset;
  }
}

/* ── OTP modal — dead markup preserved for fidelity, see booking-form.js ── */
.bf-cl-otp-overlay {
  position: fixed;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  inset: 0;
  background: rgb(0 0 0 / 60%);
}

.bf-cl-otp-overlay.bf-cl-show {
  display: flex;
}

.bf-cl-verify-popup {
  position: relative;
  width: 90%;
  max-width: 420px;
  padding: 32px 24px;
  border-radius: 18px;
  background: #FFF;
  box-shadow: 0 10px 40px rgb(0 0 0 / 25%);
  animation: bf-cl-popup-fade 0.25s ease;
}

@keyframes bf-cl-popup-fade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bf-cl-verify-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 18px;
}

.bf-cl-verify-title {
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
}

.bf-cl-otp-boxes {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.bf-cl-otp-box {
  width: 42px;
  height: 42px;
  border: none;
  border-bottom: 2px solid #CCC;
  text-align: center;
  font-size: 20px;
}

.bf-cl-otp-box:focus {
  border-bottom-color: #E8402A;
}

.bf-cl-otp-resend-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.bf-cl-otp-resend-btn {
  border: none;
  background: none;
  color: #E8402A;
  font-weight: 600;
  cursor: pointer;
}

.bf-cl-otp-proceed-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(90deg, #F05A22, #E8402A);
  color: #FFF;
  cursor: pointer;
}

.bf-cl-otp-proceed-btn:disabled {
  background: #BDBDBD;
  color: #F5F5F5;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1;
}
