/*
  =====================================================================================
  prenotazione.css - Pagine di prenotazione, recupero prenotazione e area admin (v60)
  Si carica DOPO site.css e ne usa le variabili (--cream, --gold...).
  v60: riformattato a 2 spazi e commentato; regole e ordine invariati.
  =====================================================================================
*/

/* ===================================================================================
   STRUTTURA GENERALE DELLE PAGINE DI PRENOTAZIONE
   =================================================================================== */
body.booking-page {
  background: #0b0908;
  color: #eee;
}

/* Contenuto principale, sotto la barra fissa (padding-top 105px). */
.booking-main {
  padding: 105px 28px 50px;
  max-width: 1500px;
  margin: auto;
}

.booking-heading {
  text-align: center;
  margin-bottom: 25px;
}

.booking-heading h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  margin: 4px 0;
  color: var(--cream);
}

/* ===================================================================================
   VECCHIA MAPPA DELLA SALA A POSTI NUMERATI (non più usata, mantenuta)
   =================================================================================== */
.booking-layout {
  display: grid;
  grid-template-columns: minmax(700px, 1fr) 370px;
  gap: 28px;
  align-items: start;
}

.hall-card {
  background: radial-gradient(circle at 50% 20%, #2a170c, #0e0b09 65%);
  border: 1px solid rgba(202, 155, 55, .45);
  padding: 20px;
  border-radius: 7px;
  overflow: auto;
}

/* Palcoscenico. */
.stage {
  height: 86px;
  min-width: 780px;
  background: linear-gradient(#704317, #2c180b);
  border: 2px solid #b88a32;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: inset 0 0 30px #000;
}

.stage span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  letter-spacing: .12em;
  color: #f1cf7a;
}

.event-picker {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 20px;
}

/* Campi di testo e tendine chiari (usati in tutte le pagine di prenotazione e admin). */
.booking-select,
.booking-input {
  background: #f7f1e8;
  border: 1px solid #cbbda8;
  border-radius: 3px;
  padding: 11px;
  color: #24180d;
}

.theater-map {
  min-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

/* File di poltrone con corridoio centrale. */
.seat-row {
  display: grid;
  grid-template-columns: 48px repeat(5, 56px) 38px repeat(5, 56px) 48px;
  gap: 5px;
  align-items: end;
}

.row-six {
  grid-template-columns: 48px repeat(5, 56px) 38px 48px repeat(5, 56px) 48px;
}

.row-seven {
  grid-template-columns: 48px repeat(6, 56px) 38px 56px repeat(4, 56px) 48px;
}

.seat-spacer,
.chair-spacer {
  display: block;
}

.row-number {
  text-align: center;
  color: #ddd;
  align-self: center;
}

/* Singolo posto (poltrona o sedia disegnata con :before/:after). */
.seat {
  position: relative;
  border: 0;
  background: transparent;
  width: 56px;
  height: 58px;
  cursor: pointer;
  color: #f8df9b;
  font-family: Georgia, serif;
  font-size: 15px;
}

/* Schienale della poltrona. */
.seat.armchair:before {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 5px;
  height: 39px;
  border-radius: 13px 13px 8px 8px;
  background: linear-gradient(#b21e18, #5e0808);
  border: 1px solid #d36c48;
  box-shadow: inset 0 -8px 8px rgba(0, 0, 0, .5), 0 3px 4px #000;
}

/* Seduta della poltrona. */
.seat.armchair:after {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 6px;
  height: 16px;
  border-radius: 5px;
  background: #5b0b08;
  border: 1px solid #a64a32;
}

/* Schienale della sedia. */
.seat.chair:before {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  top: 5px;
  height: 28px;
  border-radius: 4px;
  background: linear-gradient(#9c281e, #4d0b08);
  border: 2px solid #c79442;
  box-shadow: 0 3px 0 #8b642c;
}

/* Gambe della sedia. */
.seat.chair:after {
  content: '';
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 5px;
  height: 18px;
  border-left: 3px solid #c79442;
  border-right: 3px solid #c79442;
}

/* Numero del posto. */
.seat span {
  position: relative;
  z-index: 3;
  top: 13px;
  text-shadow: 0 1px 2px #000;
}

.seat.chair span {
  top: -13px;
  color: #f1cf7a;
}

/* Colori di stato: selezionato (verde), opzionato (blu), occupato (grigio). */
.seat.selected.armchair:before,
.seat.selected.armchair:after {
  background: linear-gradient(#2eae62, #126332);
}

.seat.optioned.armchair:before,
.seat.optioned.armchair:after {
  background: linear-gradient(#318fd2, #124b78);
}

.seat.occupied.armchair:before,
.seat.occupied.armchair:after {
  background: linear-gradient(#6c6c6c, #292929);
}

.seat.selected.chair:before {
  background: #2eae62;
}

.seat.optioned.chair:before {
  background: #318fd2;
}

.seat.occupied.chair:before {
  background: #666;
}

.seat:disabled {
  cursor: not-allowed;
  opacity: .8;
}

/* Legenda dei colori. */
.seat-legend {
  min-width: 780px;
  display: flex;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
  margin: 22px 0 5px;
  padding-top: 14px;
  border-top: 1px solid rgba(202, 155, 55, .35);
}

.seat-legend span {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 13px;
}

.legend-seat {
  width: 24px;
  height: 22px;
  border-radius: 7px 7px 3px 3px;
  background: #8c130f;
  border: 1px solid #d36c48;
}

.legend-seat.selected {
  background: #218c4b;
}

.legend-seat.optioned {
  background: #237fc0;
}

.legend-seat.occupied {
  background: #555;
}

.legend-chair {
  width: 15px;
  height: 25px;
  border: 2px solid #c79442;
  background: #8c130f;
}

/* ===================================================================================
   RIEPILOGO / RIQUADRO CHIARO (usato anche dalle vecchie pagine PayPal)
   =================================================================================== */
.booking-summary {
  position: sticky;
  top: 95px;
  background: #f7f1e8;
  color: #21170f;
  padding: 22px;
  border-radius: 8px;
  box-shadow: 0 15px 50px #000;
}

.show-summary {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 15px;
}

.summary-poster {
  width: 105px;
  max-height: 160px;
  object-fit: contain;
  background: #111;
}

.show-summary h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  margin: 3px 0;
}

.show-summary p {
  line-height: 1.4;
}

.selected-list {
  min-height: 44px;
}

.selected-item {
  display: flex;
  justify-content: space-between;
  border: 1px solid #d9cdbd;
  padding: 8px;
  margin: 5px 0;
  background: #fffaf4;
}

.booking-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  font-size: 18px;
}

.booking-total strong {
  font-size: 28px;
}

/* Campo di testo a tutta larghezza. */
.booking-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
}

/* Pulsanti secondari a tutta larghezza. */
.booking-pay,
.booking-secondary {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 0;
  cursor: pointer;
}

.booking-secondary {
  padding: 12px;
  background: #2c241d;
  color: #f1cf7a;
  border: 1px solid #a57b2d;
}

/* Messaggi di esito (errori in rosso scuro). */
.booking-message {
  display: block;
  margin-top: 12px;
  color: #8a1f16;
}

.payment-note {
  font-size: 12px;
  color: #6b6259;
  text-align: center;
}

/* Pulsante "Prenota i posti" nella scheda dello spettacolo (Home). */
.booking-cta {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(202, 155, 55, .25);
}

.booking-button {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-summary {
    position: static;
  }

  .hall-card {
    order: 2;
  }

  .booking-summary {
    order: 1;
  }
}

@media (max-width: 700px) {
  .booking-main {
    padding: 90px 10px 30px;
  }

  .booking-heading h1 {
    font-size: 40px;
  }

  .hall-card {
    padding: 10px;
  }
}

/* ===================================================================================
   v17 - PRENOTAZIONE SEMPLICE MULTIPOSTO (Prenotazione.aspx)
   =================================================================================== */
.simple-booking-main {
  max-width: 1050px;
  margin: 0 auto;
  padding-bottom: 70px;
}

/* Riquadro con locandina a sinistra e modulo a destra. */
.simple-booking-card {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 32px;
  background: rgba(20, 18, 16, .94);
  border: 1px solid rgba(198, 160, 91, .28);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.simple-show-summary {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.simple-poster {
  width: 180px;
  max-height: 270px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
}

.simple-show-text h2 {
  margin-top: 5px;
}

/* Colonna del modulo separata da una linea dorata. */
.simple-form {
  border-left: 1px solid rgba(198, 160, 91, .2);
  padding-left: 32px;
}

/* Campi su due colonne. */
.simple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.simple-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.simple-field label {
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #d8c49b;
}

.simple-field .booking-input,
.simple-field .booking-select {
  width: 100%;
  box-sizing: border-box;
}

/* Testo "Posti disponibili per questa replica...". */
.availability-note {
  display: block;
  margin: -3px 0 18px;
  color: #d8c49b;
  font-size: .94rem;
}

.simple-submit {
  width: 100%;
  margin-top: 8px;
}

.simple-message {
  display: block;
  margin-top: 16px;
  line-height: 1.5;
}

.simple-note {
  margin-top: 18px;
  color: #aaa;
  font-size: .88rem;
  line-height: 1.5;
}

/* Tablet: una sola colonna, modulo sotto la locandina. */
@media (max-width: 820px) {
  .simple-booking-card {
    grid-template-columns: 1fr;
  }

  .simple-form {
    border-left: 0;
    border-top: 1px solid rgba(198, 160, 91, .2);
    padding-left: 0;
    padding-top: 24px;
  }
}

/* Smartphone: locandina sopra il testo e campi su una colonna. */
@media (max-width: 560px) {
  .simple-show-summary {
    flex-direction: column;
  }

  .simple-poster {
    width: 150px;
  }

  .simple-grid {
    grid-template-columns: 1fr;
  }
}

/* v18 - allineamento campi e conferma PDF */
.simple-field .booking-input,
.simple-field .booking-select {
  margin: 0;
  height: 42px;
  min-height: 42px;
}

.simple-pdf-button {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 14px;
  padding: 14px 18px;
}

/* ===================================================================================
   v37 - RECUPERO E GESTIONE PRENOTAZIONE (RecuperaPrenotazione.aspx)
   =================================================================================== */
.recovery-main {
  max-width: 900px;
}

.recovery-card {
  background: #12100f;
  border: 1px solid rgba(198, 160, 91, .28);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

/* Riga con etichetta "Prenotazione" e codice. */
.recovery-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.recovery-title strong {
  color: #d7b25f;
  font-size: 1.25rem;
  letter-spacing: .08em;
}

/* Pulsanti Salva / PDF su due colonne, Annulla a tutta larghezza. */
.recovery-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.recovery-actions .recovery-danger {
  grid-column: 1 / -1;
}

.recovery-secondary {
  text-align: center;
  text-decoration: none;
  padding: 14px 18px;
}

/* Pulsante di annullamento (rosso, contorno). */
.recovery-danger {
  border: 1px solid #8f2020;
  background: transparent;
  color: #e6b1a7;
  padding: 14px 18px;
  cursor: pointer;
  letter-spacing: .1em;
}

.recovery-link-button {
  background: #8b6c32;
}

@media (max-width: 560px) {
  .recovery-actions {
    grid-template-columns: 1fr;
  }

  .recovery-actions .recovery-danger {
    grid-column: auto;
  }
}
