/**
 * ============================================================================
 * 🌿 THE UPPER ROOM STAYCATION — DEMO ENGINE MASTER STYLESHEET
 * File: demostaycation.css
 * Domain: https://demobookingstaycation.joyceyap.com
 * Architecture: Clean, modular, responsive, mobile-first design system
 * ============================================================================
 */

/* ─── GOOGLE FONTS IMPORT ─── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@300;400;500;600;700&family=Caveat:wght@500;600;700&display=swap');

/* ─── 1. DESIGN TOKENS & SYSTEM VARIABLES ─── */
:root {
  --cream: #F6F0E4;
  --cream-deep: #EFE6D3;
  --paper: #FFFDF8;
  --espresso: #3B2A1F;
  --umber: #6B4A34;
  --ink: #59493B;
  --ink-soft: #7A6A5A;
  --gold: #AD8A52;
  --gold-deep: #8C6C36;
  --gold-pale: #FDF8ED;
  --sage: #758265;
  --rust: #9C5330;
  --rust-deep: #7E4224;
  --line: rgba(59, 42, 31, 0.14);
  --shadow-lg: 0 24px 60px -15px rgba(59, 42, 31, 0.35);
  --shadow-md: 0 12px 32px -8px rgba(59, 42, 31, 0.2);
  --shadow-sm: 0 4px 16px rgba(59, 42, 31, 0.08);
  --shadow: 0 20px 50px -20px rgba(59, 42, 31, 0.35);
  --radius: 18px;
  --radius-lg: 24px;
}

/* ─── 2. RESET & BASE ELEMENTS ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Work Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ─── 3. TYPOGRAPHY SYSTEM ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Fraunces', serif;
  color: var(--espresso);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

.script {
  font-family: 'Caveat', cursive;
  color: var(--gold);
}

.kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── 4. COMMON BUTTONS & CONTROLS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rust), var(--rust-deep));
  color: #ffffff !important;
  box-shadow: 0 4px 18px rgba(156, 83, 48, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(156, 83, 48, 0.45);
}

.btn-secondary {
  background: var(--paper);
  color: var(--espresso);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  background: var(--cream-deep);
}

/* ─── 5. TOP NOTIFICATION BAR ─── */
.top-bar {
  background: var(--espresso);
  color: var(--cream);
  text-align: center;
  padding: 10px 16px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-bar .dot {
  color: var(--gold);
}

/* ─── 6. UNIFIED SITE NAVIGATION HEADER ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: all 0.3s ease;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
}

.brand-text .name {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--espresso);
  line-height: 1.15;
}

.brand-text .loc {
  font-size: 11.5px;
  color: var(--gold-deep);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navlink {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s ease;
}

.navlink:hover {
  color: var(--rust);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── 7. MOBILE TOGGLE & MOBILE DRAWER NAVIGATION ─── */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--espresso);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(32, 23, 17, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .mobile-drawer {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer .panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(85vw, 340px);
  height: 100%;
  background: var(--paper);
  box-shadow: -8px 0 32px rgba(32, 23, 17, 0.3);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

body.drawer-open .mobile-drawer .panel {
  transform: translateX(0);
}

.mobile-drawer .close-btn {
  align-self: flex-end;
  background: var(--cream-deep);
  border: none;
  font-size: 20px;
  color: var(--espresso);
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  margin-bottom: 8px;
}

.mobile-drawer .close-btn:hover {
  background: var(--gold-pale);
}

.mobile-drawer .navlink {
  font-size: 16px;
  font-weight: 500;
  color: var(--espresso);
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  min-height: 48px;
}

.mobile-drawer .navlink:hover,
.mobile-drawer .navlink:active {
  background: var(--cream-deep);
  color: var(--rust);
}

.mobile-drawer .drawer-cta {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ─── 8. CONCIERGE FAQ CHAT WIDGET ─── */
.widget-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.launcher-badge {
  background: var(--espresso);
  color: var(--cream);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: bouncePrompt 3s ease-in-out infinite;
  cursor: pointer;
  border: 1px solid rgba(246, 240, 228, 0.2);
  user-select: none;
}

.launcher-badge span.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4E9F3D;
  box-shadow: 0 0 0 0 rgba(78, 159, 61, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(78, 159, 61, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(78, 159, 61, 0); }
  100% { box-shadow: 0 0 0 0 rgba(78, 159, 61, 0); }
}

@keyframes bouncePrompt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.launcher-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--rust));
  border: 2px solid var(--cream);
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.launcher-btn:hover {
  transform: scale(1.08);
}

.chat-widget-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 120px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-widget-container.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-header {
  background: var(--espresso);
  color: var(--cream);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-info img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
}

.chat-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.chat-header-status {
  font-size: 11.5px;
  color: #79D70F;
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.chat-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #FCFAF6;
}

.message-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message-row.bot {
  align-items: flex-start;
}

.message-row.user {
  align-items: flex-end;
}

.msg-author {
  font-size: 11px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-left: 6px;
}

.msg-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
}

.message-row.bot .msg-bubble {
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message-row.user .msg-bubble {
  background: var(--espresso);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.msg-time {
  font-size: 10.5px;
  color: #9C8F80;
  margin-right: 6px;
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  width: fit-content;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--ink-soft);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-4px); opacity: 1; }
}

.quick-replies-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px 12px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.quick-btn {
  background: var(--cream);
  border: 1px solid var(--gold);
  color: var(--espresso);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-btn:hover {
  background: var(--gold);
  color: #ffffff;
}

.chat-input-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid var(--line);
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  outline: none;
}

.chat-input-row button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--rust);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── 9. TOAST NOTIFICATION ─── */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--espresso);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: #B33927;
}

/* ─── 10. UNIFIED FOOTER & LIVE TESTING DEMO BANNER ─── */
footer,
.site-footer {
  background: #201711;
  color: #D8B98B;
  padding: 40px 20px 32px;
  text-align: center;
  border-top: 2px solid var(--gold);
  margin-top: 48px;
}

footer .flinks,
.site-footer .flinks {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  margin-bottom: 16px;
}

footer .flinks a,
.site-footer .flinks a {
  color: #F6F0E4;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

footer .flinks a:hover,
.site-footer .flinks a:hover {
  color: var(--gold);
}

footer .fcopyright,
.site-footer .fcopyright {
  font-size: 13.5px;
  color: #D8B98B;
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
}

.live-testing-badge {
  font-size: 12px;
  color: #EFE6D3;
  background: rgba(173, 138, 82, 0.15);
  padding: 8px 18px;
  border-radius: 99px;
  display: inline-block;
  border: 1px dashed #AD8A52;
  line-height: 1.45;
  max-width: 900px;
}

/* ─── 11. UNIVERSAL MOBILE VIEW RESPONSIVENESS (BREAKPOINTS) ─── */
@media (max-width: 992px) {
  .links {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  /* CRITICAL REQUIREMENT: Remove top action buttons in mobile view */
  .site-nav .nav-cta .btn,
  .site-nav .btn-primary,
  .site-nav .btn,
  .site-nav a.btn,
  .nav-cta a.btn,
  .top-bar-btn {
    display: none !important;
  }

  /* Compact & Clean Mobile Nav Header */
  .nav-inner {
    padding: 10px 16px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand-text .name {
    font-size: 16px;
  }

  .brand-text .loc {
    font-size: 10.5px;
  }

  /* Fluid mobile typography */
  h1, .hero-text h1, .brand-title {
    font-size: clamp(1.65rem, 6vw, 2.25rem) !important;
    line-height: 1.2 !important;
  }

  h2, .section-head h2 {
    font-size: clamp(1.35rem, 5vw, 1.85rem) !important;
    line-height: 1.25 !important;
  }

  h3 {
    font-size: clamp(1.15rem, 4vw, 1.45rem) !important;
  }

  p, .hero-text p, .policy-content p {
    font-size: 14.5px !important;
    line-height: 1.55 !important;
  }

  /* Spacing ergonomics */
  .wrap,
  .page-wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  /* Stepper in Booking engine on mobile */
  .stepper {
    gap: 8px !important;
    padding: 12px 10px !important;
  }

  .step-label {
    font-size: 11px !important;
  }

  .step-circle {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }

  /* Forms and Inputs */
  input,
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    min-height: 46px;
  }

  /* FAQ Widget on mobile — WIDENED & COMPACT TOP/BOTTOM */
  .chat-widget-container {
    left: 8px !important;
    right: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: 100vw !important;
    bottom: 8px !important;
    height: min(650px, calc(100dvh - 16px)) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 18px !important;
  }

  .chat-header,
  .widget-header {
    padding: 8px 12px !important;
  }

  .chat-header-info img,
  .avatar {
    width: 32px !important;
    height: 32px !important;
    font-size: 15px !important;
  }

  .chat-header-title,
  .header-text h4 {
    font-size: 14.5px !important;
    line-height: 1.2 !important;
    margin: 0 !important;
  }

  .chat-header-status {
    display: none !important;
  }

  .chat-close-btn,
  .action-icon-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 16px !important;
    padding: 4px !important;
  }

  .chat-body {
    padding: 10px 12px !important;
  }

  .msg-bubble {
    max-width: 95% !important;
    font-size: 13.5px !important;
    line-height: 1.45 !important;
    padding: 10px 13px !important;
  }

  /* Compact Bottom Controls */
  .quick-replies-scroll,
  .quick-chips-wrapper {
    padding: 4px 10px 6px !important;
    gap: 4px !important;
  }

  .quick-btn,
  .quick-chip {
    padding: 4px 9px !important;
    font-size: 11px !important;
    border-radius: 99px !important;
  }

  .chat-input-row,
  .chat-footer {
    padding: 6px 10px 8px !important;
    gap: 6px !important;
  }

  .chat-input-row input,
  .chat-input {
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    border-radius: 99px !important;
  }

  .chat-input-row button,
  .send-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  .widget-launcher {
    right: 14px;
    bottom: 16px;
  }

  .launcher-badge {
    display: none; /* Hide prompt text bubble on small mobile to avoid blocking content */
  }

  /* Footer on mobile */
  footer .flinks,
  .site-footer .flinks {
    gap: 12px;
    font-size: 13px;
  }

  .live-testing-badge {
    font-size: 11.5px;
    padding: 8px 14px;
    border-radius: 16px;
  }
}
