/* MGM Resorts demo — shared styles
   Brand tokens are injected from demo.config.js as CSS variables (see <head> inline script). */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-page, #fff);
  color: var(--text-dark, #111827);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- Header ---- */
.site-header {
  background: var(--brand-primary, #000);
  color: #fff;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid var(--brand-accent, #c8a352);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.25em;
  font-weight: 600;
  color: #fff;
}
.wordmark .accent {
  color: var(--brand-accent, #c8a352);
}
.header-meta {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Page wrap ---- */
.page {
  min-height: calc(100vh - 80px);
  background: var(--bg-muted, #f7f5f1);
  padding: 2rem 1.5rem 4rem;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.container-narrow {
  max-width: 720px;
  margin: 0 auto;
}

/* ---- Hero (booking page) ---- */
.hero {
  background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
  color: #fff;
  border-radius: 8px;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--brand-accent, #c8a352);
}
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(200, 163, 82, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-accent, #c8a352);
  margin: 0 0 0.75rem;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 0.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 2rem;
  max-width: 520px;
}

/* ---- Booking summary card (used on multiple pages) ---- */
.booking-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.booking-card-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-dark, #111827);
}
.booking-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted, #374151);
}
.booking-row .label {
  color: var(--text-light, #6b7280);
}
.booking-row .value {
  color: var(--text-dark, #111827);
  font-weight: 500;
}
.booking-row.total {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #e5e7eb);
  font-size: 1.0625rem;
}
.booking-row.total .value {
  font-weight: 700;
  color: var(--brand-accent, #c8a352);
}

/* ---- Booking page two-column layout ---- */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .booking-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}
.stay-details {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 2rem;
}
.stay-details h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.stay-details .property-loc {
  color: var(--text-light, #6b7280);
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
}
.stay-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color, #e5e7eb);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  margin-bottom: 1.5rem;
}
.meta-cell .meta-label {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light, #6b7280);
  margin: 0 0 0.25rem;
}
.meta-cell .meta-value {
  font-size: 1rem;
  color: var(--text-dark, #111827);
  font-weight: 500;
  margin: 0;
}
.stay-amenities {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}
.stay-amenities li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  color: var(--text-muted, #374151);
}
.stay-amenities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--brand-accent, #c8a352);
  transform: rotate(45deg);
}

/* ---- CTAs ---- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95rem 1.75rem;
  transition:
    background 120ms ease,
    transform 120ms ease,
    box-shadow 120ms ease;
  width: 100%;
}
.btn-primary {
  background: var(--brand-accent, #c8a352);
  color: #000;
}
.btn-primary:hover {
  background: var(--brand-accent-hover, #b08f3d);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--brand-accent, #c8a352);
  outline-offset: 3px;
}
.btn-secondary {
  background: transparent;
  color: var(--text-dark, #111827);
  border: 1px solid var(--border-color, #e5e7eb);
}
.btn-secondary:hover {
  background: var(--bg-muted, #f7f5f1);
}

.cta-row {
  margin-top: 1.5rem;
}

/* ---- Checkout page ---- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}
.checkout-form {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 2rem;
}
.checkout-form h2 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  margin: 0 0 0.25rem;
  font-weight: 500;
}
.checkout-form .form-subtitle {
  color: var(--text-light, #6b7280);
  margin: 0 0 1.75rem;
  font-size: 0.9375rem;
}
.form-section {
  margin-bottom: 1.75rem;
}
.form-section-title {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light, #6b7280);
  margin: 0 0 0.875rem;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}
@media (min-width: 600px) {
  .field-row.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
  .field-row.cols-3 {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.field label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light, #6b7280);
}
.field input {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 4px;
  padding: 0.75rem 0.875rem;
  font-size: 0.9375rem;
  background: #fff;
  font-family: inherit;
  color: var(--text-dark, #111827);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}
.field input:focus {
  outline: none;
  border-color: var(--brand-accent, #c8a352);
  box-shadow: 0 0 0 3px rgba(200, 163, 82, 0.18);
}
.field input[readonly] {
  background: #fafaf8;
  cursor: default;
}

.card-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  background: var(--bg-muted, #f7f5f1);
  border-radius: 4px;
  border: 1px solid var(--border-color, #e5e7eb);
}
.card-brand {
  width: 44px;
  height: 28px;
  border-radius: 3px;
  background: linear-gradient(135deg, #1f4da0 0%, #0e3478 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.card-meta {
  display: flex;
  flex-direction: column;
}
.card-line {
  font-size: 0.9375rem;
  color: var(--text-dark);
  font-weight: 500;
}
.card-sub {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.summary-aside {
  position: sticky;
  top: 1.5rem;
}

/* ---- Processing page ---- */
.processing-page {
  min-height: 100vh;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.processing-card {
  text-align: center;
  max-width: 460px;
}
.processing-wordmark {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  letter-spacing: 0.3em;
  color: var(--brand-accent, #c8a352);
  margin: 0 0 3rem;
}
.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(200, 163, 82, 0.2);
  border-top-color: var(--brand-accent, #c8a352);
  margin: 0 auto 1.75rem;
  animation: spin 0.85s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.processing-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.processing-subtitle {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.processing-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  text-align: left;
}
.processing-steps li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.625rem 0.875rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  transition:
    color 200ms ease,
    border-color 200ms ease;
}
.processing-steps li.active {
  color: #fff;
  border-left-color: var(--brand-accent, #c8a352);
}
.processing-steps li.done {
  color: rgba(200, 163, 82, 0.85);
  border-left-color: var(--brand-accent, #c8a352);
}
.step-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

/* ---- Confirmation page ---- */
.confirm-hero {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-top: 3px solid var(--brand-accent, #c8a352);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}
.check-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-accent, #c8a352);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.confirm-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-light, #6b7280);
  margin: 0 0 0.5rem;
}
.confirm-title {
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.confirm-message {
  margin: 0 auto 1rem;
  max-width: 520px;
  color: var(--text-muted, #374151);
}
.confirm-number {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-muted, #f7f5f1);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.9375rem;
  color: var(--text-dark, #111827);
  letter-spacing: 0.04em;
}

.confirm-details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .confirm-details-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.confirm-card {
  background: #fff;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  padding: 1.5rem;
}
.confirm-card h3 {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  margin: 0 0 1rem;
  font-weight: 500;
}

/* =============================================================================
   MOMENTSCIENCE EMBED — mobile presentation surface.
   Renders inline between the confirmation hero and the booking detail cards.
   Reuses the .ms-card child styles (hero/pill/h3/desc/ctas/dots/powered) so a
   single render path can swap surfaces without duplicating chrome.
   Hidden by default; shown when sdk.js picks the embed surface (mobile).
   ============================================================================= */

.ms-embed {
  display: block;
  max-width: 540px;
  margin: 2rem auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(200, 163, 82, 0.3);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: center;
  position: relative;
  font-family: inherit;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.ms-embed.active {
  opacity: 1;
  transform: translateY(0);
}

.ms-embed .ms-hero {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.ms-embed .ms-body {
  padding: 0 28px 28px;
}
.ms-embed .ms-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 40px;
  padding: 6px 16px 6px 6px;
  margin: -18px auto 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ms-embed .ms-pill img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.ms-embed .ms-pill span {
  font-size: 12px;
  color: var(--text-dark, #111827);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ms-embed h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dark, #111827);
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.ms-embed .ms-desc {
  font-size: 0.875rem;
  color: rgba(55, 65, 81, 0.85);
  line-height: 1.55;
  margin: 0 0 20px;
}
.ms-embed .ms-ctas {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.ms-embed .ms-cta-yes,
.ms-card .ms-cta-yes {
  padding: 0.875rem 1.25rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--brand-accent, #c8a352);
  border: none;
  color: #000;
  cursor: pointer;
  flex: 1;
  font-family: inherit;
  transition: background 0.15s ease;
}
.ms-embed .ms-cta-yes:hover,
.ms-card .ms-cta-yes:hover {
  background: var(--brand-accent-hover, #b08f3d);
}
.ms-embed .ms-cta-no,
.ms-card .ms-cta-no {
  padding: 0.875rem 1.25rem;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--border-color, #e5e7eb);
  color: var(--text-light, #6b7280);
  cursor: pointer;
  flex: 1;
  font-family: inherit;
  transition: all 0.15s ease;
}
.ms-card .ms-cta-no:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.18);
  color: var(--text-dark, #111827);
}
.ms-embed .ms-dots,
.ms-card .ms-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 14px;
}
.ms-embed .ms-dots span,
.ms-card .ms-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
}
.ms-embed .ms-dots span.active,
.ms-card .ms-dots span.active {
  background: var(--brand-accent, #c8a352);
}
.ms-embed .ms-powered,
.ms-card .ms-powered {
  font-size: 10px;
  color: rgba(0, 0, 0, 0.4);
  margin-top: 12px;
  letter-spacing: 0.06em;
}

/* =============================================================================
   MOMENTSCIENCE MODAL — desktop: stacked backdrop + glass card.
   ============================================================================= */

.ms-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.ms-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.ms-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transform: scale(0.95) translateY(12px);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.ms-modal-wrap.active {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.ms-card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(200, 163, 82, 0.45);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(200, 163, 82, 0.15) inset,
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow: hidden;
  font-family: inherit;
  text-align: center;
  position: relative;
}

.ms-card .ms-hero {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.ms-card .ms-body {
  padding: 0 28px 28px;
}

.ms-card .ms-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 40px;
  padding: 6px 16px 6px 6px;
  margin: -18px auto 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.ms-card .ms-pill img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.ms-card .ms-pill span {
  font-size: 12px;
  color: var(--text-dark, #111827);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ms-card .ms-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: none;
  color: var(--text-dark, #111827);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.ms-card .ms-close:hover {
  background: #fff;
}

.ms-card h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--text-dark, #111827);
  margin: 0 0 8px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.ms-card .ms-desc {
  font-size: 0.9375rem;
  color: rgba(55, 65, 81, 0.85);
  line-height: 1.55;
  margin: 0 0 22px;
}

.ms-card .ms-ctas {
  display: flex;
  gap: 10px;
}

@media (max-width: 768px) {
  .ms-modal-wrap {
    padding: 16px;
  }
  .ms-card {
    max-width: 100%;
  }
  .ms-card .ms-ctas {
    flex-direction: column;
  }
}

/* ---- Footer ---- */
.site-footer {
  background: #000;
  color: rgba(255, 255, 255, 0.55);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  border-top: 1px solid rgba(200, 163, 82, 0.4);
}
.site-footer .wordmark {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* ---- Mobile tweaks ---- */
@media (max-width: 640px) {
  .site-header {
    padding: 1rem;
  }
  .wordmark {
    font-size: 1.125rem;
    letter-spacing: 0.2em;
  }
  .header-meta {
    display: none;
  }
  .page {
    padding: 1.25rem 1rem 3rem;
  }
  .hero {
    padding: 2rem 1.5rem;
  }
  .stay-details,
  .checkout-form {
    padding: 1.5rem;
  }
  .stay-meta {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .stay-amenities {
    grid-template-columns: 1fr;
  }
  .summary-aside {
    position: static;
  }
  .confirm-hero {
    padding: 2rem 1.25rem;
  }
}
