.rsvp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  padding: 12px;
  box-sizing: border-box;
  overscroll-behavior: contain;
  touch-action: none;
}

html.rsvp-modal-open,
body.rsvp-modal-open {
  overflow: hidden;
}

.rsvp-modal.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.rsvp-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.rsvp-modal-content {
  position: relative;
  width: min(600px, 100%);
  max-width: 600px;
  margin: 0;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  color: #1f2933;
  font-size: 16px;
  line-height: 1.45;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.rsvp-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

.rsvp-modal-content h2,
.rsvp-modal-content h3 {
  margin: 0 0 0.75rem 0;
}

.rsvp-modal-content p {
  margin: 0 0 0.75rem 0;
}

.rsvp-modal-content label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 600;
  color: #25303b;
}

.rsvp-modal-content input[type="text"],
.rsvp-modal-content input[type="email"],
.rsvp-modal-content textarea,
.rsvp-modal-content select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border: 1px solid #c9d2dc;
  border-radius: 6px;
  background: #fff;
  color: #1f2933;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rsvp-modal-content textarea {
  resize: vertical;
}

.rsvp-modal-content select {
  line-height: 1.25;
  min-height: 44px;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.rsvp-modal-content select option {
  line-height: 1.25;
}

.rsvp-modal-content input:focus,
.rsvp-modal-content textarea:focus,
.rsvp-modal-content select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.rsvp-modal-content button {
  appearance: none;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  background: #E8EFE1;
  color: #1f2933;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.2s ease;
}

.rsvp-modal-content button:hover {
  background: #dce8d2;
}

.rsvp-modal-content button:active {
  transform: translateY(1px);
}

.rsvp-modal-content button[type="button"] {
  background: #E8EFE1;
  color: #1f2933;
  border: 1px solid #cfdbc3;
}

.rsvp-modal-content button[type="button"]:hover {
  background: #dce8d2;
}

#rsvp-submit-final {
  background: #125C11D9;
  color: #fff;
  border-color: #125C11D9;
}

#rsvp-submit-final:hover {
  background: #0f4d0ed9;
}

#rsvp-lookup-form button[type="submit"] {
  margin-top: 0.9rem;
}

.rsvp-step {
  margin-top: 0.5rem;
}

.rsvp-guest-list {
  margin: 1em 0;
  padding-left: 1.2em;
}

.rsvp-party-list {
  width: auto;
  max-width: 100%;
  display: inline-table;
  table-layout: auto;
  border-collapse: collapse;
  padding-left: 0;
  margin-left: 0;
}

.rsvp-party-list td:first-child {
  width: auto;
  padding-right: 10px;
}

.rsvp-party-list td:last-child {
  width: 42px;
  text-align: center;
  white-space: nowrap;
  padding-left: 2px;
  padding-right: 2px;
}

.rsvp-attendance-list {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.rsvp-attendance-list th:first-child,
.rsvp-attendance-list td:first-child {
  width: 48%;
}

.rsvp-attendance-list th:last-child,
.rsvp-attendance-list td:last-child {
  width: 52%;
}

.rsvp-attendance-list th,
.rsvp-attendance-list td {
  padding: 8px 6px;
}

.rsvp-attendance-list th {
  border-bottom: 1px solid #d7dde4;
}

.rsvp-attendance-list th:last-child {
  text-align: center;
}

.rsvp-guest-list li {
  margin-bottom: 0.3em;
}

.rsvp-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5em;
  gap: 12px;
}

th {
  text-align: left;
}

.rsvp-guest-list td {
  padding: 6px 4px;
  vertical-align: middle;
}

.rsvp-guest-list input[type="checkbox"],
.rsvp-guest-list input[type="radio"] {
  transform: scale(1.05);
}

.rsvp-guest-list td label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px 0 0;
  font-weight: 500;
}

.rsvp-modal-content h4 {
  margin: 0.25rem 0 0.25rem;
  font-weight: 600;
  color: #2b3a44;
}

.meal-options-intro {
  margin-bottom: 0.75rem;
  color: #4a5560;
}

.meal-options {
  border: 1px solid #e2e7eb;
  background: #f8faf8;
  border-radius: 8px;
  padding: 0.75rem 0.75rem 0.5rem;
}

.meal-option + .meal-option {
  margin-top: 0.6rem;
}

.meal-option-title {
  font-weight: 600;
  color: #2b3a44;
}

.meal-option-tags {
  color: #5f6c77;
  font-weight: 500;
}

.meal-option-description {
  margin: 0.25rem 0 0;
  color: #5f6c77;
  font-size: 0.92rem;
}

.meal-option-note {
  display: block;
  margin-top: 0.2rem;
}

.meal-option:last-child .meal-option-description {
  margin-bottom: 0;
}

.meal-rows {
  margin-top: 1rem;
}

.meal-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e7ebef;
}

.meal-row:first-child {
  padding-top: 0.25rem;
}

.meal-guest-name {
  display: block;
  margin-bottom: 0.35rem;
  color: #24313b;
}

.meal-row select {
  margin-top: 0.25rem;
}

.meal-row input[type="text"] {
  margin-top: 0.5rem;
}

.rsvp-radio-group {
    display: flex;
    gap: 16px;
}

.rsvp-radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Mobile */
@media (max-width: 600px) {
    .rsvp-modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 1.25rem;
        max-height: calc(100vh - 16px);
        max-height: calc(100dvh - 16px);
        overflow: auto;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .rsvp-guest-list {
        width: 100%;
    }

    .rsvp-guest-list:not(.rsvp-attendance-list):not(.rsvp-party-list) tr {
        display: flex;
        flex-direction: column;
        padding: 12px 0;
        border-bottom: 1px solid #ddd;
    }

    .rsvp-guest-list td {
        padding: 4px 0;
    }

    .rsvp-radio-group {
        justify-content: flex-start;
    }

    .rsvp-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 14px;
    }

    .rsvp-actions button {
        flex: 0 1 auto;
        min-width: 110px;
        padding: 0.45rem 0.75rem;
        font-size: 0.92rem;
    }

    .meal-options {
        padding: 0.6rem;
    }

    .rsvp-attendance-list {
        table-layout: fixed;
    }

    .rsvp-attendance-list th:first-child,
    .rsvp-attendance-list td:first-child {
        width: 48%;
    }

    .rsvp-attendance-list th:last-child,
    .rsvp-attendance-list td:last-child {
        width: 52%;
    }

    .rsvp-attendance-list td:last-child label {
        margin-right: 10px;
        white-space: nowrap;
    }

}

.step-dots-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ccc; /* Inactive color */
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-block;
}

.dot.active {
    background-color: #333; /* Current step color */
    /* transform: scale(1.3); */
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* Optional: indicate completed steps */
.dot.completed {
    background-color: #888;
}
