/* ===== LISTA NASCITA PAGE ===== */

.birthlist-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #3a5568 0%, #2b4054 50%, #4a3a5a 100%);
  padding-top: 60px;
}

.birthlist-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(232, 168, 124, 0.12) 0%, transparent 60%);
}

.birthlist-hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem;
}

.birthlist-hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.birthlist-hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.birthlist-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

/* ===== GRIGLIA BOTTONI REGALO ===== */
.gifts-root {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-width: 900px;
  margin: 0 auto;
}

.gifts-loading,
.gifts-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

.gift-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  width: 100%;
  min-height: 88px;
  padding: 1.1rem 1.25rem;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-light);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gift-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.32);
}

.gift-btn:focus-visible {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(245, 203, 167, 0.35);
}

.gift-btn-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
}

.gift-btn-price {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
}

.gift-btn-badge {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  align-self: flex-start;
}

/* Stato: prenotato (in attesa di conferma) */
.gift-btn.is-reserved {
  border-color: var(--pink);
  cursor: pointer;
}

.gift-btn.is-reserved .gift-btn-badge {
  background: rgba(212, 131, 143, 0.2);
  color: var(--pink);
}

/* Stato: confermato / preso (non cliccabile, grigio, in fondo) */
.gift-btn.is-taken {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.65;
  order: 100;
}

.gift-btn.is-taken:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.gift-btn.is-taken .gift-btn-name {
  color: var(--text-muted);
  text-decoration: line-through;
}

.gift-btn.is-taken .gift-btn-price {
  color: var(--text-muted);
}

.gift-btn.is-taken .gift-btn-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* ===== MODALE ===== */
body.gift-modal-open {
  overflow: hidden;
}

.gift-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
}

.gift-modal.open {
  display: block;
}

.gift-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, 0.8);
}

.gift-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 460px);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.gift-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 24, 36, 0.5);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gift-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.gift-modal-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  margin-bottom: 1.25rem;
}

.gift-modal-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.gift-modal-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.gift-modal-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.gift-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.gift-modal-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.25s ease;
}

.gift-modal-links a:hover {
  background: var(--accent);
  color: var(--bg-dark);
}

.gift-modal-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
}

.gift-reserve-btn {
  width: 100%;
}

.gift-reserve-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gift-modal-status {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.gift-modal-status.is-reserved {
  color: var(--pink);
}

.gift-modal-status.is-taken {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .nav-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.3s;
  }

  .nav-home-btn:hover {
    color: var(--accent);
  }

  .gifts-root {
    grid-template-columns: 1fr 1fr;
  }
}

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

/* ===== CAMPO EMAIL NEL MODALE ===== */
.gift-email-field {
  margin-bottom: 1.25rem;
  text-align: left;
}

.gift-email-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gift-email-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s ease;
  box-sizing: border-box;
}

.gift-email-input::placeholder {
  color: var(--text-muted);
}

.gift-email-input:focus {
  outline: none;
  border-color: var(--accent);
}

.gift-email-input.is-invalid {
  border-color: var(--pink);
}

.gift-email-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ===== BANNER CONFERMA ACQUISTO ===== */
.confirm-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem 1.5rem;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.confirm-banner--loading {
  background: var(--bg-card);
  color: var(--text-muted);
}

.confirm-banner--success {
  background: #2a5c3f;
  color: #a8f0c6;
}

.confirm-banner--error {
  background: #5c2a2a;
  color: #f0a8a8;
}

/* ===== LINK PRENATAL ===== */
.prenatal-link {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--pink);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 400;
  transition: background 0.25s ease, color 0.25s ease;
}

.prenatal-link:hover {
  background: var(--pink);
  color: var(--bg-dark);
}
