:root {
  --christmas-red: #c41e3a;
  --christmas-green: #2e7d32;
  --christmas-gold: #ffd700;
  --deep-forest: #1a472a;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #2c3e50 url('/images/eb9e39fe-f8ad-4f8a-8faa-0cfaa7b12e3f.png') center center / cover no-repeat fixed;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Optional dark overlay for better content readability */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 0;
}

.sparkle-wrapper {
  position: relative;
  z-index: 1;
}

/* Allow scrolling when modal is open */
body.modal-open {
  overflow: auto !important;
  padding-right: 0 !important;
}

.sparkle-wrapper {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.logo-container {
  margin-bottom: 1.5rem;
}

.logo-container img {
  max-width: 100%;
  height: auto;
  max-height: 120px;
}

.main-content {
  font-size: 1.125rem;
  color: #333;
  line-height: 1.5;
}

.main-content > p {
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Countdown Timer */
.countdown-container {
  margin: 1.5rem 0;
}

.countdown-box {
  background: #dc3545;
  border-radius: 12px;
  padding: 1rem 0.5rem;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
  border: 2px solid var(--christmas-gold);
}

.countdown-value {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  margin-top: 0.5rem;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Submit Button */
.btn-submit {
  background: white;
  color: var(--christmas-green);
  border: 2px solid var(--christmas-green);
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  margin: 1rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-submit:hover {
  background: var(--christmas-green);
  color: white;
  transform: translateY(-2px);
}

.btn-submit i {
  font-size: 1.25rem;
}

/* How It Works Button */
.btn-how-it-works {
  background: white;
  color: var(--christmas-red);
  border: 2px solid var(--christmas-red);
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  margin: 1rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-how-it-works:hover {
  background: var(--christmas-red);
  color: white;
  transform: translateY(-2px);
}

.btn-how-it-works i {
  font-size: 1.25rem;
}

/* Social Links */
.social-links {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #dc3545;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(46, 125, 50, 0.4);
}

.social-links a i {
  font-size: 1.5rem;
  color: white;
}

/* Modal Positioning - Top of Screen */
.modal-dialog {
  margin: 0.5rem auto;
  max-width: 700px;
  width: 95%;
  position: relative;
  top: 0;
}

@media (min-width: 768px) {
  .modal-dialog {
    max-width: 750px;
    margin: 1rem auto;
  }
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, 0);
}

.modal.show .modal-dialog {
  transform: translate(0, 0);
}

.modal-content {
  border-radius: 12px;
  border: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-height: none;
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: linear-gradient(140deg,rgba(196, 30, 58, 1) 0%, rgba(30, 121, 44, 1) 100%);
  color: white;
  border-bottom: 2px solid var(--christmas-gold);
  padding: 0.875rem 1rem;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-title {
  font-weight: 700;
  font-size: 1.125rem;
}

.modal-body {
  padding: 1rem 1.25rem;
  overflow-y: visible !important;
  flex: 1 1 auto;
  max-height: none !important;
}

/* Allow modal to scroll as a whole on small screens */
@media (max-height: 650px) {
  body.modal-open {
    overflow-y: auto !important;
  }

  .modal-dialog {
    margin: 0.25rem auto;
  }
}

.modal-footer {
  border-top: 1px solid #dee2e6;
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-radius: 0 0 12px 12px;
  flex-shrink: 0;
}

/* Form Styling */
.form-label {
  font-weight: 600;
  color: var(--christmas-green);
  margin-bottom: 0.35rem;
  text-align: left;
  display: block;
  font-size: 0.9rem;
}

/* Reduce spacing between form groups */
.mb-3 {
  margin-bottom: 0.875rem !important;
}

/* Compact row spacing */
.row {
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.row > [class*='col-'] {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Form animation for submission */
#addlocationform {
  transition: opacity 0.4s ease-out, max-height 0.4s ease-out, margin 0.4s ease-out;
  max-height: 5000px;
  overflow: hidden;
}

#addlocationform.form-submitting {
  opacity: 0;
  max-height: 0;
  margin: 0;
  pointer-events: none;
}

/* Loading spinner */
#loading-spinner {
  display: none;
  text-align: center;
  padding: 2rem;
}

#loading-spinner.show {
  display: block;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
}

/* Ensure thanks message is visible and prominent when it has content */
#thanks:not(:empty) {
  min-height: 60px;
  margin-bottom: 1rem;
}

#thanks:empty {
  display: none;
}

.form-control {
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  padding: 0.75rem;
  transition: border-color 0.3s ease;
  height: auto;
}

input.form-control {
  height: calc(1.5em + 0.75rem + 4px);
}

textarea.form-control {
  height: auto;
}

.form-control:focus {
  border-color: var(--christmas-green);
  box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.15);
}

.btn-success {
  background: #dc3545;
  border: none;
  border: none;
  padding: 0.625rem 1.75rem;
  font-weight: 600;
  border-radius: 50px;
  font-size: 0.95rem;
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--deep-forest), var(--christmas-green));
}

/* Compact feature checkboxes */
.feature-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.feature-checkboxes .checkbox {
  margin: 0;
  font-size: 0.85rem;
}

.feature-checkboxes label {
  margin: 0;
  font-weight: normal;
}

/* Compact photo preview */
#photo-preview img {
  max-height: 120px !important;
}

#photo-preview .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* How It Works Modal Content */
.step-card {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--christmas-gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: start;
  text-align: left;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: 600;
  color: var(--christmas-red);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.step-description {
  color: #555;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Google Places Autocomplete - Must be above modal */
.pac-container {
  z-index: 1070 !important;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.pac-item {
  padding: 8px 12px !important;
  cursor: pointer !important;
}

.pac-item:hover {
  background-color: #f0f0f0 !important;
}

/* Responsive */
@media (max-width: 576px) {
  .sparkle-wrapper {
    padding: 1.5rem;
  }

  .logo-container img {
    max-height: 100px;
  }

  .main-content {
    font-size: 1rem;
  }

  .countdown-value {
    font-size: 1.5rem;
  }

  .countdown-label {
    font-size: 0.65rem;
  }

  .btn-submit {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .btn-how-it-works {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
  }

  .social-links a {
    width: 45px;
    height: 45px;
  }

  .social-links a img {
    max-width: 24px;
  }
}

@media (max-height: 700px) {
  .sparkle-wrapper {
    padding: 1rem;
  }

  .logo-container {
    margin-bottom: 1rem;
  }

  .logo-container img {
    max-height: 80px;
  }

  .countdown-container {
    margin: 1rem 0;
  }

  .countdown-box {
    padding: 0.75rem 0.5rem;
  }

  .countdown-value {
    font-size: 1.5rem;
  }

  .social-links {
    margin-top: 1rem;
  }
}

/* Feature Chip Styles - Mobile-Friendly */
.feature-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-chip-wrapper {
  display: inline-block;
}

.feature-chip-label {
  cursor: pointer;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: white;
  border: 2px solid #dee2e6;
  color: #212529;
  font-weight: normal;
}

.feature-chip-label:active {
  transform: scale(0.98);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .feature-chip-label {
    padding: 0.6rem 1.1rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Override .btn-success to match site-wide button pattern */
#addlocation .btn-success,
#bookcustom .btn-success {
  background: white !important;
  color: var(--christmas-green) !important;
  border: 2px solid var(--christmas-green) !important;
  padding: 0.625rem 1.75rem;
  font-weight: 600;
  border-radius: 50px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

#addlocation .btn-success:hover,
#bookcustom .btn-success:hover {
  background: var(--christmas-green) !important;
  color: white !important;
  transform: translateY(-2px);
}

/* Photo upload buttons - match site pattern */
#addlocation .btn-outline-success {
  background: white;
  color: var(--christmas-green);
  border: 2px solid var(--christmas-green);
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

#addlocation .btn-outline-success:hover {
  background: var(--christmas-green);
  color: white;
  border-color: var(--christmas-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* Feature chip hover states - Red theme */
.feature-chip-label:hover {
  background: #f8f9fa;
  border-color: var(--christmas-red);
  transform: translateY(-1px);
}

.feature-chip-label input[type="checkbox"]:checked + span {
  background: var(--christmas-red);
  color: white;
  border-color: var(--christmas-red);
}

/* Social media buttons in How It Works modal - red style */
#howItWorksModal .btn-primary,
#howItWorksModal .btn-danger {
  background: white !important;
  color: #c41e3a !important;
  border: 2px solid #c41e3a !important;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

#howItWorksModal .btn-primary:hover,
#howItWorksModal .btn-primary:focus,
#howItWorksModal .btn-danger:hover,
#howItWorksModal .btn-danger:focus {
  background: #c41e3a !important;
  color: white !important;
  text-decoration: none !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
  outline: none !important;
}
