/* ===================================================
   Aperitivo1830 CSS v1.9.0 – PARTE 1
   (Root → Base Reset → Buttons → Spinner →
    Event Detail → Search Form → Archive/Grid →
    Universal Bullet Alignment)
   =================================================== */

/* ---------------------------------------------------
   :root — colori, tipografia, spaziature
--------------------------------------------------- */
:root {
  /* COLORS */
  --c-primary:    #FF6B35;
  --c-secondary:  #4C6EB1;
  --c-accent:     #9B51E0;
  --c-bg:         #F5F8FA;
  --c-surface:    #FFFFFF;
  --c-text:       #212529;
  --c-muted:      #6C757D;
  --c-shadow:     rgba(0,0,0,0.1);

  /* TYPOGRAPHY */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Montserrat', sans-serif;
  --h1-size:      2.5rem;
  --h2-size:      2rem;
  --h3-size:      1.5rem;
  --body-size:    1rem;
  --line-height:  1.6;

  /* SPACING & RADIUS */
  --space:        16px;
  --radius:       12px;
}

/* ---------------------------------------------------
   Base Reset & Typography
--------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--line-height);
}

h1, h2, h3 {
  margin: 0 0 calc(var(--space)/2);
  font-family: var(--font-heading);
  color: var(--c-text);
}
h1 { font-size: var(--h1-size); }
h2 { font-size: var(--h2-size); }
h3 { font-size: var(--h3-size); }

p {
  margin: 0 0 var(--space);
}

/* ---------------------------------------------------
   Links
--------------------------------------------------- */
a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover,
a:focus {
  color: var(--c-secondary);
  text-decoration: underline;
}

/* ---------------------------------------------------
   Buttons
--------------------------------------------------- */
button,
.btn {
  font-family: var(--font-body);
  font-size: var(--body-size);
  padding: calc(var(--space)/2) var(--space);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--c-secondary);
  transform: translateY(-3px); /* MIGLIORIA: Più movimento su hover */
  box-shadow: 0 4px 8px var(--c-shadow); /* MIGLIORIA: Aggiunto effetto shadow su hover */
}

.btn-secondary {
  background: #555; /* MIGLIORIA: Contrasto migliorato */
  color: #fff;      /* MIGLIORIA: Testo bianco per maggiore leggibilità */
  border: 1px solid #555; /* MIGLIORIA: Bordi più sottili */
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: #333; /* MIGLIORIA: Hover ancora più scuro */
  color: #fff;
  transform: translateY(-3px); /* MIGLIORIA: Più movimento */
  box-shadow: 0 4px 8px var(--c-shadow); /* MIGLIORIA: Effetto shadow */
}

/* ---------------------------------------------------
   Containers & Utility
--------------------------------------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space);
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ---------------------------------------------------
   Animations & Spinner
--------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.spinner {
  display: block;
  width: 2em;
  height: 2em;
  margin: var(--space) auto;
  border: 3px solid var(--c-muted);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===================================================
   Event Detail (Single Page) – CARD VIVID CUSTOM
   (by Lume per Aperitivo1830)
=================================================== */

/* === CARD CONTAINER === */
.aperitivo-card-vivid {
  background: linear-gradient(135deg, #FFF9F0 65%, #FFEAD9 100%);
  border-radius: 22px;
  box-shadow: 0 6px 32px 0 rgba(255,107,53,0.08), 0 1.5px 6px rgba(255,120,80,0.05);
  max-width: 520px;
  margin: 36px auto 0 auto;
  padding: 36px 28px 28px 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* === EVENT TITLE === */
.aperitivo-card-vivid .event-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: #F94D18;
  letter-spacing: -1px;
  margin-bottom: 14px;
  margin-top: 10px;
  line-height: 1.1;
}

/* === EVENT IMAGE & BADGE === */
.aperitivo-card-vivid .event-image {
  position: relative;
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 22px #FFD0B4aa;
}
.aperitivo-card-vivid .event-image img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  min-height: 190px;
  max-height: 250px;
  display: block;
}

/* === BADGE tipologia sopra immagine === */
.aperitivo-card-vivid .badge-tipologia {
  position: absolute;
  top: 16px;
  left: 16px;
  background: linear-gradient(90deg,#3DD598,#1AACE1);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 16px;
  box-shadow: 0 2px 10px #1AACE166;
  letter-spacing: 0.02em;
  z-index: 2;
  text-transform: capitalize;
}

/* === BADGE evento confermato === */
.aperitivo-card-vivid .evento-badge-confermato {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #2e7d32;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 14px;
  box-shadow: 0 2px 10px #2e7d3266;
  z-index: 2;
  text-transform: uppercase;
}

/* === BADGE chiusura a breve === */
.aperitivo-card-vivid .evento-badge-chiusura {
  position: absolute;
  top: 54px;
  right: 16px;
  background: #d84315;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 14px;
  box-shadow: 0 2px 10px #d8431555;
  z-index: 2;
  text-transform: uppercase;
}

/* === BADGE “Sei fra i primi” e “Posti in esaurimento” === */
.aperitivo-card-vivid .evento-badge-primi,
.aperitivo-card-vivid .evento-badge-fast {
  display: inline-block;
  margin: 10px auto;
  padding: 8px 22px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  text-align: center;
  line-height: 1.1;
}
.aperitivo-card-vivid .evento-badge-primi {
  background: #1976d2;
  color: #fff;
}
.aperitivo-card-vivid .evento-badge-fast {
  background: #b9a506;
  color: #fff;
}

/* === METADATA LISTA – UNO SOTTO L'ALTRO === */
.aperitivo-card-vivid .event-meta {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  background: rgba(255,255,255,0.85);
  border-radius: 13px;
  box-shadow: 0 2px 10px #FFC19026;
  padding: 20px 30px 16px 30px;
  margin: 20px 0 32px 0;
  list-style: none;
  width: 100%;
}
.aperitivo-card-vivid .event-meta li {
  display: flex !important;
  align-items: center !important;
  margin-bottom: 12px;
  font-size: 1.12rem;
  font-family: var(--font-body);
  color: #45413A;
  font-weight: 500;
  min-height: 26px;
  width: 100%;
}
.aperitivo-card-vivid .event-meta li:last-child {
  margin-bottom: 0;
}
.aperitivo-card-vivid .event-meta li[data-icon] strong::before {
  content: attr(data-icon);
  font-size: 1.13em;
  margin-right: 10px;
  vertical-align: -2px;
  display: inline-block;
  min-width: 1.2em;
}
.aperitivo-card-vivid .event-meta li strong {
  min-width: 125px;
  color: #F94D18;
  font-weight: 700;
  margin-right: 8px;
}

/* === BADGE “ULTIMI POSTI” === */
.aperitivo-card-vivid .badge-lastcall {
  display: inline-block;
  background: linear-gradient(90deg,#FF6B35 80%,#FF4040 100%);
  color: #fff;
  font-weight: 900;
  font-size: 1em;
  padding: 5px 18px;
  border-radius: 14px;
  box-shadow: 0 1.5px 8px #F94D18a0;
  margin-left: 2px;
  animation: pulse-badge 1.4s infinite alternate cubic-bezier(.7,.2,.5,1.2);
}
@keyframes pulse-badge {
  0% { box-shadow: 0 0 0 0 #F94D18aa; }
  100% { box-shadow: 0 0 0 10px #ffd9b600; }
}

/* === BOTTONE PRENOTA === */
.aperitivo-card-vivid .event-action {
  text-align: center;
  margin-top: 20px;
}
.aperitivo-card-vivid .btn-prenota,
.aperitivo-card-vivid .btn.btn-prenota {
  background: linear-gradient(90deg,#FF6B35 70%,#FFD600 100%);
  color: #fff;
  font-size: 1.13rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 36px;
  border: none;
  outline: none;
  box-shadow: 0 3px 14px #FF8A0099;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(.4,1.5,.7,1),box-shadow 0.18s cubic-bezier(.4,1.5,.7,1);
  letter-spacing: 0.01em;
  width: auto;
  min-width: 220px;
  max-width: 320px;
  margin: 0 auto;
  display: inline-block;
}
.aperitivo-card-vivid .btn-prenota:hover,
.aperitivo-card-vivid .btn-prenota:focus {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px #FFB277cc;
  background: linear-gradient(90deg,#FFD600 0%,#FF6B35 100%);
}

/* === RESPONSIVE === */
@media (max-width: 650px) {
  .aperitivo-card-vivid {
    max-width: 99vw;
    padding: 12vw 1vw 8vw 1vw;
  }
  .aperitivo-card-vivid .event-title {
    font-size: 1.18rem;
    margin-bottom: 6px;
  }
  .aperitivo-card-vivid .event-meta {
    padding: 13px 4vw 9px 4vw;
    font-size: 1.02rem;
  }
  .aperitivo-card-vivid .event-image img {
    min-height: 110px;
    max-height: 180px;
  }
  .aperitivo-card-vivid .btn-prenota {
    padding: 13px 18vw;
    min-width: 80vw;
    font-size: 1.02rem;
  }
  .aperitivo-card-vivid .evento-badge-confermato,
  .aperitivo-card-vivid .evento-badge-chiusura {
    font-size: 0.72rem;
    padding: 5px 10px;
    border-radius: 12px;
  }
}

/* ============= SEARCH FORM UX PATCH ============= */

/* Contenitore dei campi: due colonne su desktop */
.event-search .search-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  position: relative;
}

/* Campo città + label sopra */
.event-search .city-search-autocomplete {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

/* Campo select + label sopra */
.event-search #filter-viaggiatore {
  width: 100%;
}

/* Label sopra ciascun campo */
.event-search .city-search-autocomplete::before {
  content: "Seleziona Città";
  font-weight: bold;
  font-size: 1.06em;
  color: #2e437a;
  margin-bottom: 4px;
  display: block;
}
.event-search #filter-viaggiatore::before {
  content: "Tipo di viaggiatore";
  font-weight: bold;
  font-size: 1.06em;
  color: #2e437a;
  margin-bottom: 4px;
  display: block;
}

/* Input + select uniforme */
.event-search .city-search-autocomplete input[type="text"],
.event-search #filter-viaggiatore {
  height: 48px;
  font-size: 1em;
  border-radius: 10px;
  padding-left: 18px;
  border: 1.5px solid #b5c3da;
  margin-bottom: 0;
  background: #fff;
}

/* ---------------------- */
/* SUGGERIMENTI: OVERLAY  */
/* ---------------------- */
.city-search-autocomplete .citta-suggestions {
  position: absolute;
  top: 60px; /* sotto input */
  left: 0;
  width: 100%;
  z-index: 100;
  background: #fff;
  border: 1.5px solid #b5c3da;
  border-top: none;
  border-radius: 0 0 13px 13px;
  box-shadow: 0 8px 32px #a8b8de12;
  display: none;
  max-height: 230px;
  overflow-y: auto;
  animation: fadeIn .15s;
}

/* Mostra quando popolata */
.city-search-autocomplete .citta-suggestions.active,
.city-search-autocomplete .citta-suggestions:not(:empty) {
  display: block;
}

/* Lista suggerimenti pulita */
.city-search-autocomplete .citta-suggestions-list {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.city-search-autocomplete .citta-suggestions-list li {
  padding: 12px 22px;
  font-size: 1.09em;
  color: #283c4c;
  border-bottom: 1px solid #e6edf5;
  cursor: pointer;
  background: #fff;
  transition: background 0.12s, color 0.12s;
}
.city-search-autocomplete .citta-suggestions-list li:last-child {
  border-bottom: none;
  border-radius: 0 0 13px 13px;
}
.city-search-autocomplete .citta-suggestions-list li:hover,
.city-search-autocomplete .citta-suggestions-list li.selected {
  background: #f0f6ff;
  color: #2657d6;
}

/* NIENTE bullet neri! */
.city-search-autocomplete .citta-suggestions-list li::marker,
.city-search-autocomplete .citta-suggestions-list li::before {
  content: none !important;
  display: none !important;
}

/* ------ BOTTONE CERCA SOTTO ------ */
.event-search #btn-search {
  grid-column: 1 / 3;
  margin: 32px auto 0 auto;
  min-width: 240px;
  max-width: 400px;
  display: block;
  font-size: 1.18em;
  font-weight: bold;
  border-radius: 22px;
  padding: 16px 0;
}

/* Mobile: impila tutto e correggi autocomplete */
@media (max-width: 700px) {
  .event-search .search-fields {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-gap: 14px;
  }
  .event-search #btn-search {
    width: 100%;
    margin: 18px 0 0 0;
  }
  .event-search .city-search-autocomplete {
    margin-bottom: 0 !important;
    position: relative;
    z-index: 2;
  }
  .city-search-autocomplete input {
    position: relative;
    z-index: 3;
    background: #fff;
  }
  .city-search-autocomplete .citta-suggestions {
    position: absolute;
    left: 0; right: 0;
    top: 100% !important;
    margin-top: 0 !important;
    z-index: 10;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 4px 20px #0001;
    max-height: 160px;
    overflow-y: auto;
    background: #fff;
    /* NESSUNO spazio extra sopra! */
  }
}

/* ===================================================
   Archive/List Grid
=================================================== */
.event-archive,
#search-results {
  display: grid;
  gap: var(--space);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.archive-item {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--c-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
  animation: fadeIn 0.3s ease-out;
  padding-bottom: var(--space); /* MIGLIORIA: Più spazio nella parte bassa */
}
.archive-item:hover {
  transform: translateY(-4px);
}
.archive-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.archive-item h3 {
  margin: var(--space);
  font-size: var(--h3-size);
  line-height: 1.2; /* MIGLIORIA: Migliora leggibilità */
}
.archive-item p {
  margin: 0 var(--space) var(--space);
  color: var(--c-muted);
  flex-grow: 1;
}
.archive-item .archive-meta {
  margin: 0 var(--space) calc(var(--space) / 2); /* MIGLIORIA: Migliore distacco */
  font-size: 0.9rem; /* MIGLIORIA: Più compatto e leggibile */
}

/* MIGLIORIA: Distanza e separazione bottoni */
.archive-item .btn {
  margin: 8px 8px 0 0;
}

/* Spaziatura coerente per avatar e bottoni nelle card archivio/evento */
/* Applica il padding orizzontale come per testo/titolo/desrizione */
.archive-item .booking-participants,
.archive-item .btn-group,
.archive-item .btn {
  margin-left: var(--space);
  margin-right: var(--space);
}

/* Se i bottoni non sono in un wrapper, si può aggiungere anche una classe wrapper per i bottoni, ad esempio: */
.archive-item .btn-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: var(--space);
}

/* Miglioramento su mobile (padding ridotto) */
@media (max-width: 600px) {
  .archive-item .booking-participants,
  .archive-item .btn-group,
  .archive-item .btn {
    margin-left: 8px;
    margin-right: 8px;
  }
}

/* ===== Archive Stats (posti totali e partecipanti) ===== */
.archive-item .archive-stats {
  display: flex;
  flex-direction: row;
  gap: 28px;
  margin: 0 var(--space) 8px var(--space);
  padding: 0;
  align-items: center;
  font-size: 0.97rem;
  color: var(--c-text);
  font-family: var(--font-body);
}

.archive-item .archive-stats__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.archive-item .archive-stats__label {
  color: var(--c-muted);
  font-weight: 700;
  font-size: 0.97rem;
  margin-right: 3px;
}

.archive-item .archive-stats__val {
  color: var(--c-secondary);
  font-weight: 700;
  font-size: 1rem;
  min-width: 18px;
  display: inline-block;
}

@media (max-width: 600px) {
  .archive-item .archive-stats {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    margin: 0 8px 6px 8px;
  }
}

/* ===================================================
   Aperitivo1830 CSS v1.9.0 – PARTE 2
   (Dashboard: Wrapper, Counters & Cards)
   =================================================== */

/* ---------------------------------------------------
   Dashboard wrapper e contatori
--------------------------------------------------- */
#dashboard-utenti {
  background: var(--c-surface);
  padding: calc(var(--space) * 2);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--c-shadow);
  margin-bottom: var(--space);
}

.dashboard-counters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space);
  margin-bottom: calc(var(--space) * 2);
}

.dashboard-counters .counter-item {
  background: var(--c-bg);
  padding: var(--space);
  text-align: center;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-counters .counter-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--c-shadow);
}

.dashboard-counters .counter-item h3 {
  margin: 0 0 calc(var(--space)/4);
  font-size: 2rem;
  color: var(--c-primary);
}

.dashboard-counters .counter-item p {
  margin: 0;
  color: var(--c-muted);
}

/* ---------------------------------------------------
   Dashboard prenotazioni cards
--------------------------------------------------- */
.dashboard-bookings .bookings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space);
}

@media (max-width: 768px) {
  .dashboard-bookings .bookings-grid {
    grid-template-columns: 1fr;
  }
}

.booking-card {
  background: var(--c-surface);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px var(--c-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.booking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--c-shadow);
}

/* Immagine evento */
.booking-card img.booking-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--c-bg);
}

/* Contenuto evento */
.booking-info {
  padding: var(--space);
  display: flex;
  flex-direction: column;
  gap: calc(var(--space)/2);
}

.booking-info h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text);
}

.booking-info h4 a {
  color: var(--c-primary);
}
.booking-info h4 a:hover {
  color: var(--c-accent);
  text-decoration: underline;
}

/* Meta data (data evento) */
.booking-meta {
  font-size: 0.9rem;
  color: var(--c-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.booking-meta::before {
  content: '📅';
  font-size: 0.9rem;
}

/* Descrizione breve */
.booking-excerpt {
  font-size: 0.875rem;
  color: var(--c-text);
  margin: var(--space) 0 0;
  line-height: 1.4;
}

/* Statistiche partecipazioni */
.booking-stats {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Partecipanti simulati */
.booking-participants {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px; /* MIGLIORIA: più spazio rispetto agli elementi sopra */
}

/* Icona partecipante */
.participant-icon {
  width: 20px;  /* MIGLIORIA: leggermente più piccolo */
  height: 20px;
  border-radius: 50%;
  background-color: var(--c-secondary);
  color: #fff;
  font-size: 0.7rem; /* MIGLIORIA: proporzionale */
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  border: 1px solid var(--c-bg);
  transition: background-color 0.2s ease;
}
.participant-icon:hover {
  background-color: var(--c-accent);
}

/* Bottone gestione prenotazione */
.apr-manage-btn {
  align-self: flex-start;
  font-size: 0.875rem;
  padding: 6px 12px;
  margin-top: 16px; /* MIGLIORIA: più distacco dai pallini/avatar */
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.apr-manage-btn:hover {
  transform: translateY(-1px);
}

/* Notice “già prenotato” */
.notice-warning {
  margin-top: calc(var(--space)/2);
  padding: calc(var(--space)/2);
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: var(--radius);
  color: #856404;
  font-size: 0.875rem;
  text-align: center;
}

/* Avatar generico membro */
.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .booking-card img.booking-image {
    height: 160px;
  }
  .booking-info h4 {
    font-size: 1rem;
  }
  .apr-manage-btn {
    width: 100%;
    text-align: center;
  }
}
/* ===================================================
   Modal Popup — Stile centrale per conferme/alert
   Aperitivo1830 v2.1
=================================================== */

#modal-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(26, 33, 44, 0.65); /* Più scuro e opaco */
  align-items: center;
  justify-content: center;
  transition: background 0.18s cubic-bezier(.6,.8,.4,1);
}
body.modal-open {
  overflow: hidden !important;
}
#modal-popup .apr-modal-box {
  min-width: 340px;
  max-width: 95vw;
  background: #181A21;
  border-radius: 18px;
  box-shadow: 0 8px 40px 0 #0007, 0 2px 8px #FF6B3590;
  padding: 44px 26px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn .18s;
  position: relative;
  border: 1.5px solid #24262c;
}
#modal-popup .apr-modal-body {
  text-align: center;
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 28px;
  line-height: 1.68;
  word-break: break-word;
  letter-spacing: 0.01em;
}
#modal-popup .apr-modal-actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}
#modal-popup .apr-modal-actions .btn {
  min-width: 120px;
  padding: 14px 0;
  font-size: 1.05rem;
  border-radius: 24px;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  box-shadow: 0 2px 8px #21262d0c;
}
#modal-popup .apr-modal-close {
  position: absolute;
  right: 18px;
  top: 13px;
  font-size: 1.7em;
  background: none;
  border: none;
  color: #bbb;
  cursor: pointer;
  transition: color .15s;
  z-index: 2;
  padding: 0 5px;
}
#modal-popup .apr-modal-close:hover { color: #FF6B35; }

@media (max-width: 480px) {
  #modal-popup .apr-modal-box {
    min-width: unset;
    padding: 24px 6px 14px 6px;
  }
  #modal-popup .apr-modal-body {
    font-size: 1.01rem;
    margin-bottom: 16px;
  }
  #modal-popup .apr-modal-actions .btn {
    min-width: 98px;
    font-size: 0.98rem;
    padding: 12px 0;
  }
}

/* Scroll lock quando la modale è aperta */
body.modal-open {
  overflow: hidden !important;
}
/* Fine modale popup */

/* ===================================================
   City List (Elenco Città)
   Stili per il nuovo shortcode [aperitivo_city_list]
   =================================================== */
.city-list-wrapper {
  margin: 40px 0;
}
.city-list-title {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.25rem;
}
.city-list-subtitle {
  text-align: center;
  color: var(--c-muted);
  margin-bottom: 1.5rem;
}
.city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.city-tab {
  background: var(--c-bg);
  border: 1px solid #ddd;
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--c-text);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.city-tab.active {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-weight: 600;
}
.city-tab:hover {
  background: #fff;
}
.city-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.city-card {
  position: relative;
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.city-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.city-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.city-card .country-code {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 0.75rem;
  color: var(--c-muted);
}
.city-events-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #8a3ab9;
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
}
.city-events-badge .dashicons {
  font-size: 1rem;
  line-height: 1;
}

/* ===================================================
   Account status alert (ban/sospensione)
   Visualizzato nella dashboard quando l’utente è sospeso o bannato
   =================================================== */
.apr-account-status-alert {
  background: #ffe6e6;
  border: 1px solid #ffb3b3;
  color: #c0392b;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
  line-height: 1.4;
}

/* ===================================================
   Tabella partecipanti frontend (shortcode staff)
   =================================================== */
.apr-participants-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.apr-participants-table th,
.apr-participants-table td {
  border: 1px solid #ddd;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: middle;
}
.apr-participants-table th {
  background: #f7f7f7;
  font-weight: 600;
}
.apr-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}
.apr-badge-green {
  background: #2ecc40;
}
.apr-badge-red {
  background: #c0392b;
}
.apr-badge-orange {
  background: #f39c12;
}

/* ===== UX PATCH 2025-07-28 – ARIA SPAZI RISULTATI & GRIGLIA ===== */

/* 1. Spazio tra ricerca e risultati filtrati */
#search-results, .event-archive {
  margin-top: 42px !important;
  margin-bottom: 38px !important;
}

/* 2. Spazio tra bottone cerca e risultati */
.event-search + #search-results {
  margin-top: 42px !important;
}

/* 3. Spazio tra le card evento nella griglia risultati */
.event-archive,
#search-results {
  gap: 36px !important;
  row-gap: 36px !important;
  column-gap: 28px !important;
  margin-bottom: 32px;
}

/* 4. Più padding interno alle card */
.archive-item {
  padding: 26px 0 38px 0 !important;
  margin-bottom: 12px !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 20px #0001 !important;
}

/* 5. Migliora aria tra titolo, stats e testo */
.archive-item h3 {
  margin: 22px 24px 16px 24px !important;
}
.archive-item .archive-meta,
.archive-item .archive-stats {
  margin-bottom: 16px !important;
}

/* 6. Spazio extra tra risultati e paginazione */
.event-pager {
  margin-top: 38px !important;
  margin-bottom: 28px !important;
  text-align: center;
  font-size: 1.13em;
  color: #676767;
}

/* 7. Sezione risultati: centra tutto su desktop ampio */
@media (min-width: 950px) {
  #search-results,
  .event-archive {
    justify-items: center;
  }
}

/* 8. Mobile: gap più contenuto e aria ottimizzata */
@media (max-width: 650px) {
  .event-archive,
  #search-results {
    gap: 18px !important;
    row-gap: 18px !important;
    column-gap: 0 !important;
    margin-bottom: 18px;
  }
  #search-results, .event-archive {
    margin-top: 22px !important;
  }
  .event-pager {
    margin-top: 24px !important;
    margin-bottom: 14px !important;
    font-size: 1em;
  }
  .archive-item {
    padding: 14px 0 22px 0 !important;
  }
}

/* 9. Rimuovi eventuale margin-bottom eccessivo dal form */
.event-search {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* ===== FINE PATCH SPAZIATURA ===== */
