/**
 * Wedding RSVP Styles
 * Dark theme matching the main wedding site
 */

/* Custom Fonts */
@font-face {
  font-family: 'ITC Anna';
  src: url('/fonts/ITC Anna Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Kabel';
  src: url('/fonts/NeueKabel-Book.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Kabel';
  src: url('/fonts/NeueKabel-BookItalic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Kabel';
  src: url('/fonts/NeueKabel-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Neue Kabel';
  src: url('/fonts/NeueKabel-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Color palette */
:root {
  --smoky-black: #100C08;
  --alabaster: #FAFAFA;
  --akaroa: #D4C4A8;
  --oxblood: #4A0000;
  --fir-green: #27352A;

  /* Semantic colors */
  --bg-primary: var(--smoky-black);
  --bg-secondary: #1a1614;
  --text-primary: var(--alabaster);
  --text-secondary: #b8b8b8;
  --accent: var(--akaroa);
  --accent-hover: #c4b498;
  --error: #e57373;
  --success: #81c784;
}

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Source Serif 4', 'Georgia', serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 3rem;
}

.couple-names {
  font-family: 'ITC Anna', 'Georgia', serif;
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--accent);
  margin: 0 0 0.5rem;
  letter-spacing: 0.05em;
}

.event-date {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Main content */
main {
  flex: 1;
}

/* Sections */
.section {
  animation: fadeIn 0.3s ease;
}

.section[hidden] {
  display: none;
}

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

/* Typography */
h2 {
  font-family: 'Neue Kabel', 'Georgia', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 1rem;
  text-align: center;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--fir-green);
}

.instructions {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
  text-align: center;
}

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

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

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

label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--fir-green);
  border-radius: 4px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 196, 168, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: #666;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: 'Neue Kabel', 'Georgia', serif;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--smoky-black);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(212, 196, 168, 0.1);
}

.btn-text,
.btn-loading {
  display: inline;
}

.btn-loading[hidden] {
  display: none;
}

/* Form actions */
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.form-actions .btn-secondary {
  flex: 0 0 auto;
}

.form-actions .btn-primary {
  flex: 1;
}

/* Messages */
.error-message {
  color: var(--error);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(229, 115, 115, 0.1);
  border-radius: 4px;
}

.info-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 4px;
}

/* Household selection */
.household-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.household-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--fir-green);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.household-card:hover {
  border-color: var(--accent);
  background: rgba(212, 196, 168, 0.05);
}

.household-card-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.household-card-guests {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* RSVP status */
.rsvp-status {
  background: var(--bg-secondary);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.rsvp-status p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.rsvp-status p:first-child {
  color: var(--text-primary);
}

/* Guest list */
.guest-item {
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.guest-name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.guest-name-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.guest-first-name-display {
  font-weight: 600;
  font-size: 1.1rem;
}

.guest-name-input {
  flex: 1;
  max-width: 200px;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.name-hint {
  display: block;
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-secondary);
  font-style: italic;
}

.guest-attendance {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 0;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0 0.5rem 0 0;
  accent-color: var(--accent);
}

.radio-text {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.guest-dietary label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dietary-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.guest-dietary input {
  padding: 0.625rem 0.75rem;
  font-size: 0.9rem;
}

/* Confirmation */
.confirmation-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: var(--accent);
  color: var(--smoky-black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.confirmation-message {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.confirmation-summary {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.summary-household {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--fir-green);
}

.summary-group {
  margin-bottom: 1rem;
}

.summary-group:last-child {
  margin-bottom: 0;
}

.summary-group h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.summary-group ul {
  margin: 0;
  padding-left: 1.25rem;
}

.summary-group li {
  color: var(--text-secondary);
  padding: 0.25rem 0;
}

.confirmation-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Footer */
footer {
  margin-top: auto;
  padding-top: 3rem;
  text-align: center;
}

footer p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem;
  }

  .couple-names {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
  }

  .guest-attendance {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions .btn-secondary,
  .form-actions .btn-primary {
    width: 100%;
  }
}
