/* RSVP Page Styles */

.rsvp-page {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

.rsvp-overlay {
  flex-grow: 1;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.rsvp-container {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 2rem;
  max-width: 32rem;
  width: 100%;
  margin-bottom: 2.5rem;
}

.rsvp-content {
  width: 100%;
}

.rsvp-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 1rem;
}

.rsvp-intro {
  font-size: 1.125rem;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.rsvp-field {
  margin-bottom: 1.5rem;
}

.rsvp-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.hw-combobox {
  width: 100%;
}

.rsvp-input {
  width: calc(100% - 1.5rem);
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.9);
  transition: all 0.2s ease-in-out;
}

@media (min-width: 640px) {
  .hw-combobox {
    min-width: calc(50% + 1.5rem);
  }
  .rsvp-input {
    min-width: 400px;
  }
}

.rsvp-combobox:focus,
.rsvp-input:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

.rsvp-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.rsvp-submit {
  background-color: var(--color-primary);
  color: white;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
}

.rsvp-submit:hover {
  background-color: var(--color-primary-dark);
  transform: scale(1.05);
}

.rsvp-submit:active {
  transform: scale(0.98);
}

/* Choice Step Styles */
.rsvp-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  form {
    display: flex;
  }
}

@media (min-width: 640px) {
  .rsvp-choice-buttons {
    flex-direction: row;
    gap: 1rem;
  }
}

.rsvp-choice-btn {
  flex: 1;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
  text-align: center;
}

.rsvp-choice-btn--primary {
  background-color: var(--color-quaternary-800);
  color: #1a1a1a;
}

.rsvp-choice-btn--primary:hover {
  background-color: var(--color-dark-quaternary-200);
  transform: scale(1.05);
}

.rsvp-choice-btn--disabled {
  background-color: #d1d5db;
  color: #6b7280;
  cursor: not-allowed;
}

.rsvp-invites-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.rsvp-invites-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}

.rsvp-invites-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.rsvp-invite-tag {
  background-color: var(--color-quaternary-400);
  color: #1a1a1a;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
}

.rsvp-invite-tag--empty {
  background-color: transparent;
  color: #9ca3af;
}

.rsvp-back-action {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.5rem;
  width: 100%;
}

.rsvp-back-btn {
  background-color: var(--color-primary);
  color: white;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
  display: inline-block;
}

.rsvp-back-btn:hover {
  background-color: var(--color-primary-dark);
  transform: scale(1.05);
}

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

  .rsvp-title {
    font-size: 2rem;
  }

  .rsvp-intro {
    font-size: 1rem;
  }
}

input::placeholder {
  color: #9ca3af;
}

/* Presence Step Styles */
.rsvp-presence-container {
  background-color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  padding: 2rem;
  max-width: 64rem;
  margin-bottom: 2.5rem;
}

.rsvp-timeline-link {
  text-align: center;
  font-size: 1.125rem;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

.rsvp-timeline-link-text {
  color: var(--color-secondary-800);
  text-decoration: underline;
  font-weight: 600;
}

.rsvp-timeline-link-text:hover {
  color: var(--color-dark-secondary-200);
}

.rsvp-table-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.25rem 0;
}

.rsvp-presence-table {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 1.25rem 0;
  border: none;
}

.rsvp-presence-thead {
  color: white;
}

.rsvp-presence-header-row {
  background-color: var(--color-secondary);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  border-radius: 0.5rem 0 0 0.5rem;
  margin-bottom: 0.5rem;
}

.rsvp-presence-th {
  padding: 0.75rem;
  text-align: center;
  width: 100px;
}

.rsvp-presence-th-name {
  width: 80px;
}

.rsvp-presence-event-detail {
  color: white;
}

.rsvp-presence-tbody {
  flex: 1;
}

.rsvp-presence-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  margin-bottom: 0.5rem;
}

.rsvp-presence-td {
  border-bottom: 2px solid var(--color-secondary-800);
  background-color: #ffffff;
  padding: 0.75rem;
  text-align: center;
  height: 61px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rsvp-presence-td:hover {
  background-color: var(--color-background-light);
}

.rsvp-presence-td-name {
  border-bottom: 2px solid var(--color-secondary-800);
  background-color: var(--color-secondary-lighter);
}

.rsvp-presence-td-name:hover {
  background-color: var(--color-secondary-light);
}

.rsvp-presence-td-not-attending {
  background-color: var(--color-secondary-lighter);
}

.rsvp-presence-td-not-attending:hover {
  background-color: var(--color-secondary-light);
}

.rsvp-presence-name-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: center;
  font-size: 1.125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
  max-width: calc(100% - 10px);
}

.rsvp-presence-checkbox {
  width: 1.5rem;
  height: 1.5rem;
  accent-color: var(--color-primary);
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  border: 2px solid var(--color-secondary);
  border-radius: 0.25rem;
  position: relative;
}

.rsvp-presence-checkbox:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.rsvp-presence-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.125rem;
  font-weight: bold;
}

.rsvp-presence-checkbox:not(:checked) {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.rsvp-presence-actions {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 1.5rem 1.5rem 1rem;
}

/* Desktop styles - table layout */
@media (min-width: 850px) {
  .rsvp-presence-table {
    display: inline-table;
  }

  .rsvp-presence-header-row:not(:first-child) {
    display: none;
  }

  .rsvp-presence-header-row {
    display: table-row;
    background-color: var(--color-secondary);
    border-radius: 0;
    margin-bottom: 0;
  }

  .rsvp-presence-th {
    display: table-cell;
    height: 61px;
    width: auto;
  }

  .rsvp-presence-row {
    display: table-row;
    margin-bottom: 0;
  }

  .rsvp-presence-td {
    display: table-cell;
  }

  .rsvp-presence-name-label {
    max-width: none;
  }
}

/* Mobile styles adjustments */
@media (max-width: 850px) {
  .rsvp-presence-th {
    height: 61px;
    width: 100px;
  }

  .rsvp-presence-td {
    height: 61px;
  }

  .rsvp-presence-td-name label {
    padding-right: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
  }

  .rsvp-presence-tbody {
    max-width: calc(100% - 100px);
  }
}
@media (max-width: 850px) {
  .rsvp-presence-td:last-child {
    border-bottom: none;
  }

  .rsvp-presence-th:last-child {
    border-bottom: none;
  }
}
.rsvp-presence-th:not(:last-child) {
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

/* Disabled row state */
.rsvp-presence-row.disabled .rsvp-presence-td-checkbox {
  opacity: 0.4;
  pointer-events: none;
}

.rsvp-presence-row.disabled .rsvp-presence-td-checkbox .rsvp-presence-checkbox {
  cursor: not-allowed;
  pointer-events: none;
}

/* Visually hide checkmarks when row is disabled */
.rsvp-presence-row.disabled .rsvp-presence-td-checkbox .rsvp-presence-checkbox:checked {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  border: 2px solid #d1d5db;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
}

/* Don't disable the "not attending" checkbox itself */
.rsvp-presence-row.disabled .rsvp-presence-td-not-attending {
  opacity: 1;
  pointer-events: auto;
}

/* Allergies Step Styles */
.rsvp-subtitle {
  font-size: 1.125rem;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.rsvp-allergies-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rsvp-allergy-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rsvp-allergy-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.rsvp-allergy-textarea {
  width: calc(100% - 24px);
  min-height: 100px;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--color-secondary);
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: all 0.2s ease-in-out;
  resize: vertical;
}

.rsvp-allergy-textarea:focus {
  outline: none;
  border-color: var(--color-secondary-dark);
  background-color: white;
  box-shadow: 0 0 0 3px var(--color-secondary-lighter);
}

.rsvp-allergy-textarea::placeholder {
  color: #9ca3af;
}

@media (max-width: 640px) {
  .rsvp-subtitle {
    font-size: 1rem;
  }

  .rsvp-allergy-label {
    font-size: 1rem;
  }

  .rsvp-allergy-textarea {
    font-size: 0.875rem;
  }
}

/* Housing Step Styles */
.rsvp-housing-info-box {
  background-color: var(--color-secondary-lighter);
  border-left: 4px solid var(--color-secondary);
  padding: 1.5rem;
  border-radius: 0.375rem;
  margin: 2rem 0;
}

.rsvp-housing-info-text {
  color: var(--color-text);
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0;
}

.rsvp-housing-question {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 2rem 0 1.5rem;
}

.rsvp-housing-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.rsvp-housing-btn {
  font-weight: bold;
  padding: 0.875rem 2rem;
  border-radius: 0.375rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
  text-align: center;
  min-width: 150px;
  opacity: 0.4;
}

.rsvp-housing-btn--yes {
  background-color: var(--color-secondary-lighter);
  color: var(--color-text);
  border-color: var(--color-secondary);
}

.rsvp-housing-btn--yes:hover {
  opacity: 0.6;
  transform: scale(1.02);
}

.rsvp-housing-btn--yes.rsvp-housing-btn--selected-yes {
  background-color: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary-dark);
  opacity: 1;
  transform: scale(1.05);
}

.rsvp-housing-btn--no {
  background-color: var(--color-primary-lighter);
  color: var(--color-text);
  border-color: var(--color-primary);
}

.rsvp-housing-btn--no:hover {
  opacity: 0.6;
  transform: scale(1.02);
}

.rsvp-housing-btn--no.rsvp-housing-btn--selected-no {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary-dark);
  opacity: 1;
  transform: scale(1.05);
}

.rsvp-housing-price-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-secondary-lighter);
}

.rsvp-housing-price-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 1.5rem;
}

.rsvp-housing-price-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.rsvp-housing-price-table thead {
  background-color: var(--color-secondary-lighter);
}

.rsvp-housing-price-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-secondary);
}

.rsvp-housing-price-table td {
  padding: 0.75rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-secondary-lighter);
}

.rsvp-housing-price-total-row {
  background-color: var(--color-accent-lighter);
}

.rsvp-housing-price-total-row td {
  border-bottom: none;
  font-size: 1.125rem;
}

.rsvp-housing-payment-info {
  background-color: var(--color-accent-lighter);
  padding: 1rem;
  border-radius: 0.375rem;
  border-left: 4px solid var(--color-accent);
}

.rsvp-housing-payment-info p {
  margin: 0;
  color: var(--color-text);
  font-size: 0.875rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .rsvp-housing-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .rsvp-housing-btn {
    width: 100%;
  }

  .rsvp-housing-info-text {
    font-size: 1rem;
  }

  .rsvp-housing-question {
    font-size: 1.125rem;
  }

  .rsvp-housing-price-table {
    font-size: 0.875rem;
  }

  .rsvp-housing-price-table th,
  .rsvp-housing-price-table td {
    padding: 0.5rem;
  }
}

/* Music Step Styles */
.rsvp-music-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.rsvp-music-label {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
}

.rsvp-music-textarea {
  width: calc(100% - 1.5rem);
  min-height: 120px;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--color-secondary);
  border-radius: 0.375rem;
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  transition: all 0.2s ease-in-out;
  resize: vertical;
}

.rsvp-music-textarea:focus {
  outline: none;
  border-color: var(--color-secondary-dark);
  background-color: white;
  box-shadow: 0 0 0 3px var(--color-secondary-lighter);
}

.rsvp-music-textarea::placeholder {
  color: #9ca3af;
}

@media (max-width: 640px) {
  .rsvp-music-label {
    font-size: 1rem;
  }

  .rsvp-music-textarea {
    font-size: 0.875rem;
    min-height: 100px;
  }
}
