/* Reset */
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600&family=Beth+Ellen&display=swap");

/* CSS Custom Properties */
:root {
  /* Primary Colors */
  --primary-dark: #b22158; /* Main headings, search text */
  --primary-medium: #d46b8c; /* Secondary headings, celebration text */
  --primary-light: #ebb6c2; /* Buttons, accents */
  --primary-pale: #eed4e2; /* Background boxes, containers */
  --backgroung-green: #64763c;

  /* Neutral Colors */
  --white: #ffffff; /* Alternative background */
  --text-dark: #666666; /* Body text - charcoal grey */
  --text-muted: #666666; /* Helper text */
}

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

/* Base Layout */
body {
  background-color: var(--backgroung-green);
  background-image: url('/static/images/backgrounds/RSVP_Background.png');
  font-family: "Lora", serif;
  min-height: 100vh;
  padding: 2rem;
}

/* Container */
.container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 4rem);
}

/* Form Container */
.form-container {
  background-color: var(--white);
  padding: 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Title */
h2 {
  color: var(--primary-dark);
  font-size: 1.75rem;
  margin-bottom: 2rem;
  font-weight: normal;
}

p {
  color: var(--text-dark);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Form Elements */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Updated Input Fields with Borders */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--primary-medium);
  background-color: var(--white);
  font-size: 1rem;
  border-radius: 0.375rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

/* Focus state for input fields */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(212, 107, 140, 0.2);
}

/* Placeholder styling */
input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

/* Submit Button */
button,
button[type="submit"],
input[type="submit"] {
  background-color: var(--primary-light);
  color: var(--text-dark);
  font-size: 1.125rem;
  padding: 0.625rem 2.5rem;
  border: none;
  border-radius: 1.5rem;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
  background-color: var(--primary-medium);
  transform: translateY(-1px);
}

/* Error Message Styling */
.error-message {
  color: #d85c4f;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 576px) {
  body {
    padding: 1rem;
  }

  .container {
    min-height: calc(100vh - 2rem);
  }

  .form-container {
    padding: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  input[type="text"],
  input[type="email"],
  select,
  textarea {
    max-width: 100%;
  }
}

/* Button Container for side-by-side buttons */
.button-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

/* Ensure buttons in container don't take full width */
.button-container button {
  flex: 0 0 auto;
  min-width: 120px;
}

/* Save the Date Video Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
}

.modal-container {
  background-color: var(--primary-pale);
  border-radius: 1rem;
  max-width: 90vw;
  max-height: 90vh;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary-light);
  color: white;
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
  background-color: var(--primary-medium);
  transform: scale(1.05);
}

.modal-content {
  padding: 2rem;
  text-align: center;
}

.modal-title {
  color: var(--primary-dark);
  font-size: 2rem;
  margin-bottom: 1rem;
  font-weight: normal;
}

.modal-subtitle {
  color: var(--primary-medium);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Responsive YouTube Video Container */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0.5rem;
}

/* Modal transitions (for Alpine.js) */
[x-cloak] {
  display: none !important;
}

/* Responsive breakpoints for modal */
@media (min-width: 640px) {
  .modal-container {
    max-width: 640px;
  }

  .modal-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 768px) {
  .modal-container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .modal-container {
    max-width: 900px;
  }
}

/* Mobile optimizations */
@media (max-width: 576px) {
  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-content {
    padding: 1.5rem;
  }

  .modal-title {
    font-size: 1.75rem;
  }

  .modal-close-btn {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Form styling improvements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary-dark);
  font-weight: normal;
}

.form-text {
  font-size: 0.875rem;
  margin-top: 0.5rem;
  color: var(--text-muted);
  display: block;
}

.error-message {
  color: #d85c4f;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.error-message p {
  margin: 0;
}

/* Family email sharing styles */
.family-email-helper {
  background-color: #f8f9fa;
  border: 2px solid var(--primary-medium);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.family-email-helper label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.family-email-helper input[type="checkbox"] {
  margin-right: 0.75rem;
  transform: scale(1.2);
}

.shared-email-input {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--primary-medium);
}

.shared-email-input label {
  font-weight: bold;
  color: var(--primary-dark);
}

/* Guest section styling */
.guest-section {
  border: 1px solid var(--primary-medium);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: var(--white);
}

.guest-section h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.declined-guest-section {
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background-color: #f8f9fa;
}

.declined-guest-section h3 {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.attending-section h2,
.declined-section h2 {
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
}

/* Form control consistency */
.form-control {
  width: 100%;
  max-width: 400px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--primary-medium);
  background-color: var(--white);
  font-size: 1rem;
  border-radius: 0.375rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(212, 107, 140, 0.2);
}

/* Button improvements */
.btn-primary {
  background-color: var(--primary-light);
  color: var(--text-dark);
  font-size: 1.125rem;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 1.5rem;
  cursor: pointer;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  margin-top: 1.5rem;
}

.btn-primary:hover {
  background-color: var(--primary-medium);
  transform: translateY(-1px);
}

/* Email label parenthetical wraps to new line on small screens */
.email-note {
  font-weight: normal;
}

@media (max-width: 576px) {
  .email-note {
    display: block;
    margin-top: 2px;
  }
}

@media (min-width: 577px) {
  .email-note {
    display: inline;
  }
}

/* Red help text for form validation errors */
.form-text.text-muted {
  color: #d85c4f !important;
}

/* Celebration text styling */
.celebration-text {
  color: var(--primary-medium);
  font-family: "Beth Ellen", cursive;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  font-weight: normal;
}

/* Guest name display styling */
.guest-name-display {
  color: var(--text-muted);
}

/* Desktop-specific styles */
@media (min-width: 768px) {
  .container {
    max-width: 1100px;
  }

  .celebration-text {
    font-size: 3rem;
  }
}
