/* ═══════════════════════════════════════════════════════════
 * NowMade Booking Modal – Styles
 * ═══════════════════════════════════════════════════════════ */

:root {
  --nowmade-header-height: 0px;
}

/* ── Shortcode button ──────────────────────────────────────── */
.nowmade-booking-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background: var(--nm-btn-color, #C8956C);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}
.nowmade-booking-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.nowmade-booking-btn:active {
  transform: translateY(0);
}

/* ── Floating button ───────────────────────────────────────── */
.nowmade-booking-float {
  position: fixed;
  z-index: 999990;
  bottom: 24px;
  padding: 8px 22px 8px 22px;
  font-family: "Helvetica", Sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  background: var(--nm-btn-color, #C8956C);
  border: none;
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.nowmade-booking-float:hover {
  background: #7F8463;
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.35);
}
.nowmade-booking-float:active {
  background: #7F8463;
  transform: translateY(0);
}
.nowmade-booking-float:focus {
  background: #7F8463;
}
.nowmade-float-right { right: 24px; }
.nowmade-float-left  { left: 24px; }

/* ── Modal overlay ─────────────────────────────────────────── */
.nowmade-modal-overlay {
  position: fixed;
  top: var(--nowmade-header-height, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  background: transparent;
}

/* ── Slide animations ──────────────────────────────────────── */
@keyframes nowmade-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
@keyframes nowmade-slide-down {
  from { transform: translateY(0); }
  to   { transform: translateY(100%); }
}

.nowmade-modal-overlay::before {
  content: '';
  position: fixed;
  top: var(--nowmade-header-height, 0px);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: -1;
  display: none;
}

.nowmade-modal-overlay.nowmade-modal-active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal container ───────────────────────────────────────── */
.nowmade-modal-container {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nowmade-header-height, 0px));
  max-width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  background: #0d1117;
  transform: translateY(100%);
  will-change: transform;
}

/* Opening: slide up */
.nowmade-modal-active .nowmade-modal-container {
  animation: nowmade-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Closing: slide down */
.nowmade-modal-closing .nowmade-modal-container {
  animation: nowmade-slide-down 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* ── Close button ──────────────────────────────────────────── */
.nowmade-modal-close {
  display: none !important;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  color: #ccc;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nowmade-modal-close:hover {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

/* ── Iframe ────────────────────────────────────────────────── */
.nowmade-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Loading spinner ───────────────────────────────────────── */
.nowmade-modal-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1117;
  transition: opacity 0.3s;
}
.nowmade-modal-loading.nowmade-loaded {
  opacity: 0;
  pointer-events: none;
}
.nowmade-modal-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(200, 149, 108, 0.25);
  border-top-color: #C8956C;
  border-radius: 50%;
  animation: nowmade-spin 0.7s linear infinite;
}
@keyframes nowmade-spin {
  to { transform: rotate(360deg); }
}

/* ── Body scroll lock when modal open ──────────────────────── */
body.nowmade-modal-open {
  overflow: hidden !important;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nowmade-modal-overlay {
    top: 0;
    padding: 0;
  }
  .nowmade-modal-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    border-radius: 0;
  }
  .nowmade-modal-close {
    right: auto;
    left: 12px;
  }
  .nowmade-booking-float {
    bottom: 16px;
    padding: 12px 24px;
    font-size: 14px;
  }
  .nowmade-float-right { right: 16px; }
  .nowmade-float-left  { left: 16px; }
}
