/* Una sola geometria per le azioni editoriali, i pulsanti outline e il modulo. */
:root {
  --lp-action-height: 50px;
  --lp-action-gap: 16px;
  --lp-action-before: 24px;
  --lp-action-after: 32px;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--lp-action-gap);
  margin: var(--lp-action-before) 0 0;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons > .wp-block-button {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons > .wp-block-button:not(.has-custom-width) {
  width: auto;
}

:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button .wp-block-button__link,
:is(.entry-content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
:is(.entry-content, .editor-styles-wrapper) .lp-waitlist-extra,
:is(.entry-content, .editor-styles-wrapper) .btn,
.inq-form .btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
  min-height: var(--lp-action-height);
  margin: 0;
  padding: 0 24px;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  white-space: normal;
  text-decoration: none;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-button.has-custom-width .wp-block-button__link {
  width: 100%;
}
:is(.entry-content, .editor-styles-wrapper) .wp-block-button__link .arrow,
:is(.entry-content, .editor-styles-wrapper) .lp-waitlist-extra .arrow { flex-shrink: 0; }
.inq-form .btn-primary { border-color: var(--ink); }
.inq-form > .inq-sub { margin-bottom: var(--lp-action-before); }
.entry-content .lp-waitlist-extra { border-color: var(--ink); }

/* La CTA aggiunta dal modo waiting list condivide il gruppo con l'itinerario. */
.entry-content .wp-block-button:has(> .lp-waitlist-extra) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--lp-action-gap);
}

/* Il bordo dei dettagli non deve toccare il pulsante che lo precede. */
:is(.entry-content, .editor-styles-wrapper) .itin-body > .wp-block-buttons + .itin-meta {
  margin-top: var(--lp-action-after);
}
:is(.entry-content, .editor-styles-wrapper) .itin-days:has(+ .wp-block-buttons) { margin-bottom: 0; }

/* Le sezioni centrate mantengono il gruppo centrato, con gap anche quando va a capo. */
:is(.entry-content, .editor-styles-wrapper) .about-cta > p { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) .about-cta > .wp-block-group:has(> .wp-block-buttons) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--lp-action-gap);
  margin-top: var(--lp-action-before);
}
:is(.entry-content, .editor-styles-wrapper) .about-cta .wp-block-buttons { margin: 0; }
:is(.entry-content, .editor-styles-wrapper) .booking-bar .wp-block-buttons { margin: 0; }

/* L'hero conserva la CTA compatta richiesta, sullo stesso asse del suo testo. */
:is(.entry-content, .editor-styles-wrapper) .hero:has(.lp-waitlist-compact) .hero-description { margin-bottom: 0; }
:is(.entry-content, .editor-styles-wrapper) .hero-meta:has(.lp-waitlist-compact) {
  justify-content: flex-start;
  margin-top: var(--lp-action-before);
}
:is(.entry-content, .editor-styles-wrapper) .hero-meta > .hero-sub:empty { display: none; }
:is(.entry-content, .editor-styles-wrapper) .hero-ctas,
:is(.entry-content, .editor-styles-wrapper) .hero-ctas .wp-block-buttons { margin: 0; gap: var(--lp-action-gap); }
:is(.entry-content, .editor-styles-wrapper) .hero .wp-block-button.lp-waitlist-compact .wp-block-button__link {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  font-size: 13px;
  line-height: 20px;
  letter-spacing: normal;
  text-transform: none;
}

/* La barra con prezzo, deposito e CTA passa in colonna anche sui tablet. */
@media (max-width: 1023px) {
  :is(.entry-content, .editor-styles-wrapper) .booking-bar { display:flex;flex-direction:column;align-items:stretch;max-width:100%;width:100%;gap:var(--lp-action-before);padding:20px;border-radius:20px; }
  :is(.entry-content, .editor-styles-wrapper) .booking-bar > * { margin:0;min-width:0; }
  :is(.entry-content, .editor-styles-wrapper) .booking-bar .price p,
  :is(.entry-content, .editor-styles-wrapper) .booking-bar .deposit p { margin:0; }
  :is(.entry-content, .editor-styles-wrapper) .booking-bar .wp-block-buttons { justify-content:center;width:100%; }
  :is(.entry-content, .editor-styles-wrapper) .booking-bar .wp-block-buttons > .wp-block-button,
  :is(.entry-content, .editor-styles-wrapper) .booking-bar .wp-block-button > .wp-block-button__link { width:100%; }
}

@media (max-width: 767px) {
  :root { --lp-action-height: 46px; }
  :is(.entry-content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button .wp-block-button__link,
  :is(.entry-content, .editor-styles-wrapper) .wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link,
  :is(.entry-content, .editor-styles-wrapper) .lp-waitlist-extra,
  :is(.entry-content, .editor-styles-wrapper) .btn,
  .inq-form .btn { font-size: 12px; padding: 0 20px; letter-spacing: .05em; }
  :is(.entry-content, .editor-styles-wrapper) .about-cta > .wp-block-group:has(> .wp-block-buttons) { flex-direction: column; }
  :is(.entry-content, .editor-styles-wrapper) .hero .wp-block-button.lp-waitlist-compact .wp-block-button__link { padding: 0 18px; font-size: 13px; }
}
