:root {
  --primary: #d4af37; /* Gold */
  --primary-hover: #f1c40f;
  --bg-dark: #f4f4f5; /* Lightened to make dark text readable */
  --bg-panel: rgba(255, 255, 255, 0.95);
  --text-main: #2B2B2B; /* Requested body text color */
  --text-muted: #5E5E5E; /* Requested header text color */
  --error: #ef4444;
  --success: #22c55e;
  
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Page Wrapper */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* Main Layout */
.main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 992px) {
  .main-content {
    flex-direction: row;
  }
}

/* Hero Section */
.hero-section {
  position: relative;
  flex: 1;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  overflow: hidden;
}

@media (min-width: 992px) {
  .hero-section {
    flex: 1.2;
    min-height: 100vh;
    justify-content: flex-start;
    padding: 4rem 6rem;
  }
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.brand-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  color: #5E5E5E;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-main);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

/* Countdown */
#countdown-wrapper {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  display: inline-block;
}

.countdown-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.countdown-timer {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 1px;
}

/* Right Panel */
.panel-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background-color: var(--bg-dark);
  position: relative;
}

@media (min-width: 992px) {
  .panel-section {
    padding: 2rem 4rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    z-index: 10;
  }
}

.panel-container {
  width: 100%;
  max-width: 480px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.panel-header-image {
  display: none;
}

.state-view h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: #5E5E5E;
}

.state-view p {
  color: var(--text-main);
  margin-bottom: 2rem;
  font-size: 1rem;
}

.icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.icon-circle.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-group input {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.form-group input[type="date"] {
  color-scheme: light;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-row {
  display: flex;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  .form-row .form-group {
    width: 100%;
  }
}

.error-message {
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border-left: 4px solid var(--error);
  color: #991b1b;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  border-radius: 4px;
}

/* Buttons */
.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* Share Panel */
.share-panel {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.share-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #5E5E5E;
}

.share-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.share-input-group input {
  flex: 1;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

.social-share {
  display: flex;
  gap: 0.5rem;
}

.social-btn {
  flex: 1;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  transition: opacity 0.2s;
}

.social-btn:hover {
  opacity: 0.9;
}

.social-btn.fb { background: #1877f2; }
.social-btn.tw { background: #000; color: #fff; border: 1px solid rgba(255,255,255,0.2); }

/* Powered by slot */
#wbx-powered-by-slot {
  width: 100%;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  background-color: var(--bg-dark);
}

/* Responsive Overrides for Popup/Mobile Embed View */
@media (max-width: 991px) {
  body {
    background-color: transparent;
  }

  .hero-section {
    min-height: auto;
    padding: 2.5rem 1.5rem 0.5rem 1.5rem;
  }
  
  .hero-bg, .hero-overlay {
    display: none; /* Hide background on narrow screens, we'll show it in the panel */
  }
  
  .hero-content {
    text-align: center;
    margin: 0 auto;
  }
  
  /* Update header text color for narrow screens */
  .hero-title {
    font-size: 2.25rem;
    color: #5E5E5E;
  }
  
  .hero-subtitle {
    margin-bottom: 1rem;
    color: var(--text-main);
  }

  .brand-badge {
    color: #a17f16;
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.1);
  }

  .countdown-label {
    color: var(--text-muted);
  }

  #countdown-wrapper {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .panel-section {
    padding: 1.5rem;
    background-color: transparent; /* Allow iframe to blend seamlessly with parent page */
  }
  
  .panel-container {
    padding: 2rem 1.5rem;
  }
  
  /* Show the main image nested in the floating panel */
  .panel-header-image {
    display: block;
    width: calc(100% + 3rem);
    height: 200px;
    object-fit: cover;
    margin: -2rem -1.5rem 2rem -1.5rem;
    border-radius: 24px 24px 0 0;
  }

  #wbx-powered-by-slot {
    background-color: transparent;
  }
}
