/*
 * booking-popup.css — Margo Booking Popup v2.0
 * Design: Lovable — Cormorant Garamond + Work Sans, backdrop blur, bottom sheet mobile
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600&family=Work+Sans:wght@400;500;600&display=swap');

#margo-booking-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
#margo-booking-modal.margo-open { display: flex; }

#margo-booking-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 40, 30, .40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: margoFadeIn .3s ease-out;
}

#margo-booking-box {
  --bg-card: #ffffff;
  --fg: #1a1a1a;
  --fg-muted: #6b6b6b;
  --border: #e0dcd6;
  --primary: #718149;
  --primary-hover: #5e6d3c;
  --primary-fg: #f5f2ee;
  --secondary: #782227;
  --muted-bg: #f5f2ee;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Work Sans', system-ui, sans-serif;

  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 16px;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, .25);
  overflow: hidden;
  animation: margoScaleIn .4s cubic-bezier(.16, 1, .3, 1);
}

#margo-booking-inner {
  padding: 40px 40px 32px;
}

/* Close */
#margo-booking-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: #6b6b6b;
  font-size: 22px;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .3s;
}
#margo-booking-close:hover { color: #1a1a1a; }

/* Logo */
#margo-booking-logo {
  text-align: center;
  margin-bottom: 20px;
}
#margo-booking-logo img {
  height: 56px;
  object-fit: contain;
}

/* Divider */
.margo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}
.margo-divider-line {
  width: 48px;
  height: 1px;
  background: rgba(199, 183, 158, .5);
}
.margo-divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #782227;
}

/* Title */
#margo-booking-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .03em;
  color: #1a1a1a;
  margin: 0 0 28px;
}

/* Fields */
.margo-field { margin-bottom: 16px; }
.margo-field label {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #6b6b6b;
  margin-bottom: 8px;
}
.margo-field input[type="date"] {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f2ee;
  border: 1px solid #e0dcd6;
  border-radius: 12px;
  padding: 14px 16px;
  min-height: 48px;
  outline: none;
  transition: all .3s;
  -webkit-appearance: none;
  box-sizing: border-box;
}
.margo-field input[type="date"]:focus {
  border-color: #782227;
  box-shadow: 0 0 0 1px #782227;
}

/* Submit */
#margo-booking-submit {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #f5f2ee;
  background: #718149;
  border: none;
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  min-height: 48px;
  cursor: pointer;
  transition: all .3s;
}
#margo-booking-submit:hover {
  background: #5e6d3c;
  box-shadow: 0 8px 24px -8px rgba(63, 105, 85, .35);
}
#margo-booking-submit:disabled {
  opacity: .7;
  cursor: default;
}

/* Offer banner */
.margo-offer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(224, 220, 214, .6);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.margo-offer-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(199, 183, 158, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.margo-offer-icon svg {
  width: 16px;
  height: 16px;
  stroke: #782227;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.margo-offer-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #1a1a1a;
  margin-bottom: 4px;
}
.margo-offer-text {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: #6b6b6b;
}

/* Animations */
@keyframes margoFadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes margoScaleIn {
  from { opacity: 0; transform: scale(.95) translateY(10px) }
  to { opacity: 1; transform: scale(1) translateY(0) }
}
@keyframes margoSlideUp {
  from { opacity: 0; transform: translateY(100%) }
  to { opacity: 1; transform: translateY(0) }
}

/* Mobile — bottom sheet */
@media (max-width: 479px) {
  #margo-booking-modal.margo-open { align-items: flex-end; }
  #margo-booking-box {
    max-width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    animation: margoSlideUp .4s cubic-bezier(.16, 1, .3, 1);
  }
  #margo-booking-inner { padding: 28px 24px 24px; }
  #margo-booking-logo img { height: 48px; }
  #margo-booking-title { font-size: 22px; margin-bottom: 24px; }
  .margo-field input[type="date"] { font-size: 16px; }
  .margo-offer-text { font-size: 13px; }
}

/* ── Room page mobile: bouton inline à la place du formulaire ──────────────── */
#margo-room-sticky-btn {
  display: none;
}

@media (max-width: 768px) {
  /* Cacher le formulaire inline sur les pages chambre */
  body.margo-room-page #form-section {
    display: none !important;
  }

  /* Conteneur : padding homogène, centrage via text-align */
  body.margo-room-page #margo-room-sticky-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 24px 20px;
    box-sizing: border-box;
  }

  /* Bouton : clone exact des CTA Bricks (pas full-width, carré, centré) */
  #margo-room-sticky-btn button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Work Sans', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: normal;
    color: #ffffff;
    background: #718149;
    border: none;
    border-radius: 0;
    padding: 14px 20px;
    cursor: pointer;
    transform: translateX(0) translateY(0);
    transition: all 0.5s ease;
    white-space: nowrap;
  }

  #margo-room-sticky-btn button:hover {
    transform: translateX(0) translateY(-7px);
  }
}

/* ── Overlay de transition "Searching..." ──────────────────────────────────── */
#margo-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: #ffffff;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  animation: margoFadeIn .25s ease-out;
}
#margo-search-overlay.margo-open { display: flex; }

#margo-search-overlay .margo-ol-logo {
  margin-bottom: 24px;
}
#margo-search-overlay .margo-ol-logo img {
  height: 56px;
  object-fit: contain;
}

#margo-search-overlay .margo-divider {
  margin-bottom: 28px;
}

#margo-search-overlay .margo-ol-dates {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
#margo-search-overlay .margo-ol-date-block {
  text-align: center;
}
#margo-search-overlay .margo-ol-label {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #6b6b6b;
  margin-bottom: 6px;
}
#margo-search-overlay .margo-ol-date {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: .02em;
}
#margo-search-overlay .margo-ol-arrow {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 18px;
  color: #782227;
  margin-top: 12px;
}

/* Spinner */
#margo-search-overlay .margo-ol-spinner {
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(63, 105, 85, .15);
  border-top-color: #718149;
  border-radius: 50%;
  animation: margoSpin .8s linear infinite;
  margin-bottom: 16px;
}
#margo-search-overlay .margo-ol-status {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: #6b6b6b;
}

@keyframes margoSpin {
  to { transform: rotate(360deg); }
}
