/* Dakota Country Home - Farmhouse Style */

:root {
  --color-cream: #FAF7F2;
  --color-warm-white: #FFFDF9;
  --color-sage: #7D8471;
  --color-sage-dark: #5C634F;
  --color-brown: #8B7355;
  --color-brown-dark: #6B5A47;
  --color-charcoal: #3D3D3D;
  --color-text: #4A4A4A;
  --color-text-light: #7A7A7A;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.6;
}

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: #1a1a1a;
}

.slides {
  position: relative;
  height: 100%;
  width: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slide.active {
  opacity: 1;
}

/* Dark overlay for all slides */
.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.1) 40%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

/* Text overlay on first slide */
.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  color: white;
}

.slide-overlay.first-slide {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

.hero-tagline {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  font-weight: 500;
}

.slide-overlay h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
}

.hero-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.detail svg {
  opacity: 0.85;
}

/* Navigation arrows */
.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.slide-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-50%) scale(1.05);
}

.slide-nav.prev {
  left: 1.5rem;
}

.slide-nav.next {
  right: 1.5rem;
}

@media (max-width: 640px) {
  .slide-nav {
    width: 40px;
    height: 40px;
  }
  .slide-nav.prev { left: 1rem; }
  .slide-nav.next { right: 1rem; }
}

/* Slide indicator */
.slide-indicator {
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  z-index: 10;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.slide-current {
  min-width: 1.25rem;
  text-align: right;
}

.slide-separator {
  opacity: 0.6;
  margin: 0 0.125rem;
}

.slide-total {
  opacity: 0.6;
}

.slide-progress {
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin-left: 0.75rem;
  overflow: hidden;
}

.slide-progress-bar {
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 6.67%; /* 1/15 initial */
}

/* Scroll CTA */
.scroll-cta {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  z-index: 10;
}

.scroll-cta:hover {
  transform: translateX(-50%) translateY(-2px);
}

.scroll-cta svg {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(6px); }
  60% { transform: translateY(3px); }
}

/* ===== CHAT SECTION ===== */
.chat-section {
  height: 100vh;
  min-height: 100vh;
  background: var(--color-warm-white);
  position: relative;
}

#chat-container {
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* ChatKit fills full viewport */
openai-chatkit {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  max-width: 100%;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
}

/* Desktop: constrain width but keep full height */
@media (min-width: 900px) {
  #chat-container {
    padding: 0;
  }

  openai-chatkit {
    max-width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Loading state */
#chat-container:empty::before {
  content: 'Loading...';
  color: var(--color-text-light);
  font-size: 1rem;
  align-self: center;
}

/* Inline chat widgets - positioned below chat */
.chatkit-inline-widget {
  width: 100%;
  max-width: 900px;
  padding: 1.5rem;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Booking form */
#booking-form-container {
  margin: 0.75rem 0;
}

.booking-form {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.booking-form h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-charcoal);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: white;
  color: var(--color-charcoal);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-sage);
  box-shadow: 0 0 0 3px rgba(125, 132, 113, 0.15);
}

.form-group input::placeholder {
  color: var(--color-text-light);
}

.submit-btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--color-sage);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: var(--color-sage-dark);
}

/* Stripe checkout container */
#stripe-checkout-container {
  margin: 0.75rem 0;
}

.stripe-checkout-wrapper {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

#checkout-element {
  width: 100%;
  max-width: 100%;
}

/* Mobile: tighter padding */
@media (max-width: 640px) {
  .chatkit-inline-widget {
    max-width: 95%;
    padding: 0 0.5rem;
  }

  .stripe-checkout-wrapper {
    padding: 1rem;
    border-radius: 12px;
  }

  .booking-form {
    padding: 1rem;
    border-radius: 12px;
  }
}

/* Error state */
.error-message {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.error-message h2 {
  color: #B54B4B;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}

.error-message p {
  color: var(--color-text-light);
}
