body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: #f7f6f3;
  color: #1f2937;
}
h1, h2, h3 {
  text-align: center;
}
h1 {
  margin-bottom: 5px;
}
h2 {
  margin-top: 0;
  font-weight: normal;
  color: #666;
}
p {
  line-height: 1.6;
  margin-bottom: 18px;
}
.gifts-title {
  margin-top: 50px;
}
footer {
  text-align: center;
  margin-top: 60px;
  color: #777;
  font-size: 14px;
}
.gift-name {
  margin: 0 0 8px 0;
  font-size: 18px;
}
.gift-description {
  margin: 0 0 12px 0;
  color: #555;
}
.gift-status {
  margin: 0;
  font-size: 14px;
}
#lista-presentes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.gift {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.reserve-btn {
  width: 100%;
  height: 46px;
  margin-top: 16px;
  background: #1f3d2b;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reserve-btn:hover {
  background: #2f5d42;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-content {
  background: #ffffff;
  padding: 28px;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.modal-content *,
.modal-content *::before,
.modal-content *::after {
  box-sizing: border-box;
}
.modal-content h3 {
  margin-top: 0;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
}
.modal-content h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: #1f3d2b;
  margin: 10px auto 0;
}
.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
}
.modal-content textarea {
  resize: vertical;
  min-height: 80px;
}
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.confirm-btn {
  flex: 1;
  height: 42px;
  background: #1f3d2b;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.cancel-btn {
  flex: 1;
  height: 42px;
  background: #f7f6f3;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}
.confirm-btn:hover {
  background: #2f5d42;
}
.gifts-title {
  margin-top: 60px;
  margin-bottom: 20px;
  color: #1f3d2b;
  text-align: center;
}
.gift p {
  margin: 6px 0;
  line-height: 1.35;
}
.gift-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-direction: column;
  gap: 6px;
}
.gift-name {
  margin: 0;
  font-size: 18px;
}
.gift-price-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  background: #eef2eb;
  border: 1px solid #dbe4d8;
  color: #1f3d2b;
  padding: 6px 10px;
  border-radius: 999px;
}
.gift-price-label {
  font-weight: 600;
  color: #3730a3;
}
.gift-description {
  line-height: 1.5;
  margin-bottom: 8px;
}
.gift-status {
  margin: 8px 0 0;
  font-size: 14px;
}
.gift--reserved {
  opacity: 0.75;
  background: #f1f3f1;
}
.gift-note {
  font-size: 13px;
  font-style: italic;
  color: #6b7280;
}
.gift * {
  white-space: normal;
  word-break: break-word;
}
.hero {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}
.hero::before {
  display: block;
  font-size: 26px;
  margin-bottom: 12px;
}
.hero img {
  width: 200px;
  height: auto;
  border-radius: 50%;
  margin-bottom: 20px;
  border: 3px solid #e5e7eb;
}
.hero h1 {
  font-family: "Georgia", serif;
  margin: 0;
  font-size: 28px;
  letter-spacing: 1px;
  color: #1f3d2b;
}
.subtitle {
  margin-top: 6px;
  font-size: 15px;
  color: #6b7280;
}
.event-section {
  margin-top: 60px;
  padding: 32px 28px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}
.event-title {
  text-align: center;
  color: #1f3d2b;
  margin-bottom: 18px;
}
.event-highlight {
  text-align: center;
  font-size: 15px;
  color: #374151;
  margin-bottom: 18px;
}
.event-info {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.event-info li {
  margin-bottom: 10px;
  line-height: 1.5;
}
.event-note {
  text-align: center;
  font-style: italic;
  color: #6b7280;
}

body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  width: 220px;
  height: 100%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

body::before {
  left: 0;
  background-image: url("floral2.png");
}

body::after {
  right: 0;
  background-image: url("floral1.png");
}

.container {
  background-image: url("imagem.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  max-width: 900px;
  margin: 40px auto;
  padding: 40px 30px;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  body::before,
  body::after {
    display: none;
  }
}

/* ============================================================
   ✅ FIX 3: TOAST — notificação flutuante no lugar do alert()
   ============================================================

   Estratégia de animação:
   - O toast começa fora da tela (translateY(20px)) e invisível (opacity: 0)
   - A classe .toast--visible ativa a transição CSS para a posição final
   - Quando a classe é removida (após o timer), o CSS reverte suavemente
   - `pointer-events: none` garante que o toast não bloqueie cliques
     quando invisível; vira `auto` apenas quando visível
*/
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  font-weight: 500;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  max-width: 90vw;
  text-align: center;

  /* A transição aplica tanto na entrada quanto na saída */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Verde escuro do site para sucesso */
.toast.toast--success {
  background-color: #1f3d2b;
}

/* Vermelho discreto para erros */
.toast.toast--error {
  background-color: #b91c1c;
}

/* ============================================================
   MELHORIA 4: Contador de progresso
   Fica acima dos cards, centralizado, com fonte levemente menor
   para não competir com o título da seção.
   ============================================================ */
.gifts-counter {
  grid-column: 1 / -1; /* ocupa toda a largura do grid */
  text-align: center;
  font-size: 14px;
  color: #4b7a5e;
  margin: 0 0 8px;
  padding: 10px 16px;
  background: #eef2eb;
  border-radius: 8px;
  border: 1px solid #dbe4d8;
}

/* ============================================================
   MELHORIA 5: Card de lista vazia / todos reservados
   ============================================================ */
.gifts-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

.gifts-empty-emoji {
  font-size: 48px;
  margin: 0 0 12px;
  line-height: 1;
}

.gifts-empty h4 {
  font-size: 20px;
  color: #1f3d2b;
  margin: 0 0 10px;
}

.gifts-empty p {
  color: #6b7280;
  font-size: 15px;
  margin: 0;
}

/* ============================================================
   MELHORIA 1: Links de referência nos cards
   Botão discreto com aparência de link, verde alinhado com
   a identidade do site.
   ============================================================ */
.gift-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.gift-link-btn {
  display: inline-block;
  font-size: 13px;
  color: #1f3d2b;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 1px dashed #a3c4a8;
  width: fit-content;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gift-link-btn:hover {
  color: #2f5d42;
  border-color: #2f5d42;
}

/* ============================================================
   MELHORIA 3: Estado desabilitado do botão Confirmar
   ============================================================ */
.confirm-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.75;
}

/* ============================================================
   MELHORIA 6: Responsividade do modal em telas < 380px
   Em telas muito pequenas, reduzimos padding e tamanhos de
   fonte para o modal não ficar apertado ou cortado.
   ============================================================ */
@media (max-width: 380px) {
  .modal-content {
    padding: 20px 16px;
  }

  .modal-content h3 {
    font-size: 15px;
  }

  .modal-content input,
  .modal-content textarea {
    font-size: 13px;
    padding: 10px 12px;
  }

  .confirm-btn,
  .cancel-btn {
    font-size: 13px;
    height: 38px;
  }
}

/* ============================================================
   SEÇÃO DE CONFIRMAÇÃO DE PRESENÇA (RSVP)
   Segue a mesma linguagem visual da .event-section:
   card branco, borda suave, sombra leve.
   ============================================================ */
.rsvp-section {
  margin-top: 60px;
  padding: 32px 28px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.rsvp-title {
  text-align: center;
  color: #1f3d2b;
  margin-top: 0;
  margin-bottom: 10px;
}

.rsvp-subtitle {
  text-align: center;
  color: #6b7280;
  font-size: 15px;
  margin-bottom: 18px;
}

/* Contador de confirmados — mesmo estilo do gifts-counter */
.rsvp-contador {
  text-align: center;
  font-size: 14px;
  color: #4b7a5e;
  margin: 0 0 20px;
  padding: 10px 16px;
  background: #eef2eb;
  border-radius: 8px;
  border: 1px solid #dbe4d8;
}

/*
  Formulário em linha: input ocupa todo o espaço disponível
  e o botão fica fixo à direita.
  Em telas pequenas (< 480px) empilha verticalmente.
*/
.rsvp-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.rsvp-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
  box-sizing: border-box;
}

.rsvp-input:focus {
  outline: none;
  border-color: #1f3d2b;
}

.rsvp-btn {
  white-space: nowrap;
  padding: 12px 20px;
  background: #1f3d2b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rsvp-btn:hover {
  background: #2f5d42;
}

.rsvp-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.75;
}

@media (max-width: 480px) {
  .rsvp-form {
    flex-direction: column;
  }

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

/* ============================================================
   ACCORDION DE CONFIRMAÇÃO DE PRESENÇA
   ============================================================ */

/* Botão que abre/fecha a lista — alinhado ao centro da seção */
.rsvp-accordion {
  margin-top: 20px;
}

.rsvp-accordion-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 13px 20px;
  background: #1f3d2b;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: center;
}

.rsvp-accordion-btn:hover {
  background: #2f5d42;
}

/*
  O ícone ▾ é adicionado via ::after e rotaciona 180°
  quando o botão está aberto — sinaliza visualmente o estado.
*/
.rsvp-accordion-btn::after {
  content: " \25be";
  display: inline-block;
  transition: transform 0.3s ease;
}

.rsvp-accordion-btn--open::after {
  transform: rotate(180deg);
}

/*
  Corpo do accordion — animação via max-height.
  max-height: 0 + overflow: hidden = fechado e invisível.
  max-height: 9999px = aberto (valor alto garante que qualquer
  lista caiba, independente do número de convidados).
*/
.rsvp-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.rsvp-accordion-body--open {
  max-height: 9999px;
}

.rsvp-accordion-hint {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin: 18px 0 12px;
  font-style: italic;
}

.rsvp-loading {
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  padding: 16px 0;
}

/* ============================================================
   ITENS DA LISTA DE CONVIDADOS
   Cada convidado é uma linha clicável (se pendente)
   ou marcada (se confirmada).
   ============================================================ */
.rsvp-guest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rsvp-guest-item:hover {
  background: #f0f7f2;
  border-color: #a3c4a8;
}

/* Item já confirmado — visual diferente, não clicável */
.rsvp-guest-item--confirmed {
  background: #f0f7f2;
  border-color: #a3c4a8;
  cursor: default;
  opacity: 0.85;
}

.rsvp-guest-item--confirmed:hover {
  background: #f0f7f2;
  border-color: #a3c4a8;
}

.rsvp-guest-name {
  font-size: 15px;
  color: #1f2937;
}

/* Nome riscado nos confirmados */
.rsvp-guest-item--confirmed .rsvp-guest-name {
  text-decoration: line-through;
  color: #6b7280;
}

.rsvp-guest-badge {
  font-size: 12px;
  font-weight: 600;
  color: #1f3d2b;
  background: #eef2eb;
  border: 1px solid #dbe4d8;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.rsvp-guest-action {
  font-size: 13px;
  color: #1f3d2b;
  font-weight: 500;
  white-space: nowrap;
}

/* Hint dentro do modal de presença */
.rsvp-modal-hint {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  margin: -8px 0 16px;
}

/* ============================================================
   INTRODUÇÃO DA LISTA DE PRESENTES
   ============================================================ */
.gifts-intro {
  margin-top: 60px;
  padding: 32px 28px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.gifts-intro-title {
  text-align: center;
  color: #1f3d2b;
  margin-top: 0;
  margin-bottom: 18px;
}

.gifts-intro-steps {
  padding-left: 20px;
  margin: 12px 0 18px;
}

.gifts-intro-steps li {
  margin-bottom: 10px;
  line-height: 1.6;
  color: #374151;
}

.gifts-intro-note {
  font-size: 13px;
  font-style: italic;
  color: #6b7280;
  text-align: center;
  margin: 0;
}

/* ============================================================
   DROPDOWN DE CONFIRMAÇÃO DE PRESENÇA
   Select + botão dentro do accordion, centralizados e com
   largura máxima para não ficar largo demais em desktop.
   ============================================================ */
.rsvp-dropdown-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  margin: 0 auto;
}

.rsvp-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 15px;
  font-family: inherit;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  box-sizing: border-box;
  appearance: auto;
}

.rsvp-select:focus {
  outline: none;
  border-color: #1f3d2b;
}

.rsvp-accordion-confirm-btn {
  width: 100%;
  padding: 13px 20px;
  background: #1f3d2b;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rsvp-accordion-confirm-btn:hover {
  background: #2f5d42;
}

.rsvp-accordion-confirm-btn:disabled {
  background: #6b7280;
  cursor: not-allowed;
  opacity: 0.75;
}
