/* BM Social Week – base (override eventi in eventi.css) */

@font-face {
  font-family: 'Roboto Medium';
  font-display: swap;
  src: url('/_fonts/Roboto-Medium.eot');
  src: url('/_fonts/Roboto-Medium.eot?#iefix') format('embedded-opentype'),
    url('/_fonts/Roboto-Medium.woff') format('woff'),
    url('/_fonts/Roboto-Medium.ttf') format('truetype'),
    url('/_fonts/Roboto-Medium.svg#Roboto-Medium') format('svg');
  font-weight: 500;
  font-style: normal;
}

.bmPrincipal {
  text-align: center;
  padding-left: clamp(1rem, 4vw, 70px);
  padding-right: clamp(1rem, 4vw, 70px);
  box-sizing: border-box;
}

.bmLogoEvento,
.bm-logo-event {
  width: 100%;
  max-width: 880px;
  height: auto;
}

.bmBgOrange {
  background-color: orange;
}

.bmInputForm {
  margin-top: 12px;
  margin-right: 15px;
  width: 40%;
  display: inline-block;
  font-size: 16px;
  min-height: 44px;
  box-sizing: border-box;
}

.bmInputFormSmall {
  margin-top: 12px;
  margin-right: 15px;
  width: 20%;
  display: inline-block;
  font-size: 16px;
  min-height: 44px;
  box-sizing: border-box;
}

.bmInputFormAlert {
  width: 100%;
  font-size: 16px;
  text-align: center;
  color: #ffba3a;
  font-weight: 500;
  text-shadow: 1px 0 black;
  padding-top: 15px;
}

/* Legacy project cards (non-eventi grid pages) */
.bm-projects-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
}

.bmProject {
  flex: 1 1 280px;
  max-width: 320px;
  min-height: 140px;
  margin: 0;
  padding: 0.75rem;
  background-color: #fff;
  border: 5px solid #005366;
  border-radius: 30px;
  cursor: pointer;
  box-sizing: border-box;
}

.bmProjectFull {
  background-color: #c0c0c0;
}

.bmProjectStato {
  font-weight: bold;
  text-decoration: underline;
  margin-top: 0.35rem;
}

.bmProjectStato.is-hidden {
  display: none;
}

.bmProjectEnd {
  width: 100%;
  clear: both;
}

.bmProjectCheck {
  border: 5px solid gold;
  background: url('/_immagini/vote.png') no-repeat top right;
}

.bmProjectIscrC {
  border: 5px solid orange;
  background: url('/_immagini/vote.png') no-repeat top right;
}

.bmProjectIscrL {
  border: 5px solid silver;
  background: url('/_immagini/queue.png') no-repeat top right;
}

.bmProjectImg {
  height: 100px;
  text-align: center;
}

.bmProjectImg img {
  margin-left: auto;
  margin-right: auto;
  max-height: 100%;
  width: auto;
}

.bmProjectTitle {
  padding: 5px;
  font-family: 'Roboto Medium', sans-serif;
  font-size: 1.125rem;
  text-align: center;
  text-transform: uppercase;
}

.bmProjectDesc {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8125rem;
  text-align: center;
}

/* eventi.php grid — override legacy flex sizing (see eventi.css) */
.bm-eventi-page .bmProject {
  flex: none;
  max-width: none;
}

.bmPrivacy {
  cursor: pointer;
  color: #000;
}

.bmPrivacy:hover {
  color: orange;
}

/* Colorbox popup body */
.bm-colorbox-body {
  margin: 0;
  padding: 0.6rem;
  box-sizing: border-box;
  overflow-x: hidden;
}

.bm-colorbox-body .bmPrincipal {
  padding: 0;
  text-align: left;
  min-height: auto;
  background: none;
}

.bm-colorbox-body .bm-event-layout {
  margin-top: 0;
  font-size: 1.05rem;
  gap: 0.25rem;
}

.bm-colorbox-body .bm-event-layout__content {
  padding-top: 0;
  flex-basis: auto;
}

/* Colorbox popup – reset browser default paragraph spacing */
.bm-colorbox-body p {
  margin: 0.15rem 0;
}

.bm-colorbox-body .bm-text-justify {
  margin: 0.35rem 0 !important;
}

/* Colorbox popup – avoid reserved 400px media height on mobile */
.bm-colorbox-body .bm-event-layout__media {
  flex: 0 0 auto;
}

/* Colorbox popup – center title + meta lines */
.bm-colorbox-body .bmProjectTitle {
  text-align: center !important;
  width: 100%;
  max-width: none !important;
  margin: 0 0 0.35rem;
}

.bm-colorbox-body .bm-event-layout__content > p:not(.bm-text-justify) {
  text-align: center;
  margin: 0.15rem 0;
}

/* Colorbox popup – keep image compact (preserve ratio) */
.bm-colorbox-body .bm-event-image {
  display: block;
  max-height: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

/* Colorbox popup – modern buttons (scoped) */
.bm-colorbox-body .btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-family: 'Roboto Medium', sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  border: 2px solid transparent;
  box-shadow: 0 6px 16px rgba(0, 83, 102, 0.14);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .bm-colorbox-body .btn {
    transition: none;
  }
}

.bm-colorbox-body .btn:focus {
  outline: none;
  box-shadow: 0 6px 16px rgba(0, 83, 102, 0.14);
}

.bm-colorbox-body .btn:focus-visible {
  outline: 2px solid #ffba3a;
  outline-offset: 2px;
}

.bm-colorbox-body .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 83, 102, 0.18);
}

.bm-colorbox-body .btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 83, 102, 0.14);
}

.bm-colorbox-body .btn-default,
.bm-colorbox-body .btn-default:hover,
.bm-colorbox-body .btn-default:active,
.bm-colorbox-body .btn-default:focus {
  background-image: none !important;
}

.bm-colorbox-body .btn-default {
  background-color: #005366 !important;
  color: #ffffff !important;
}

.bm-colorbox-body .btn-default:hover {
  background-color: rgb(0, 58, 71) !important;
}

.bm-colorbox-body .btn-default:before,
.bm-colorbox-body .btn-default:hover:before,
.bm-colorbox-body .btn-default:active:before,
.bm-colorbox-body .btn-default:focus:before {
  content: none !important;
}

.bm-colorbox-body .btn:disabled,
.bm-colorbox-body .btn.disabled {
  opacity: 0.62;
  box-shadow: none;
  transform: none;
}

.bm-colorbox-body .bm-btn-secondary {
  background-color: transparent !important;
  color: #005366 !important;
  border-color: rgba(0, 83, 102, 0.35) !important;
  box-shadow: none;
}

.bm-colorbox-body .bm-btn-secondary:hover {
  background-color: rgba(0, 83, 102, 0.08) !important;
  border-color: rgba(0, 83, 102, 0.5) !important;
  box-shadow: none;
}

/* Delete button in evento_rimuovi.php uses bmDele(...) */
.bm-colorbox-body .bm-event-actions .btn[onclick*="bmDele"] {
  background-color: #c0392b !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

.bm-colorbox-body .bm-event-actions .btn[onclick*="bmDele"]:hover {
  background-color: #a93226 !important;
}

.bm-colorbox-body .bm-event-actions .btn[onclick*="bmDele"]:before {
  content: none !important;
}

.bm-colorbox-body .bm-event-selector__label {
  font-family: 'Roboto Medium', sans-serif;
  font-weight: 600;
  color: #005366;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  margin: 0.25rem 0 0.35rem;
}

.bm-colorbox-body .bm-toggle {
  background-color: transparent !important;
  color: #005366 !important;
  border-color: rgba(0, 83, 102, 0.35) !important;
  box-shadow: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.bm-colorbox-body .bm-toggle:hover {
  background-color: rgba(0, 83, 102, 0.08) !important;
  border-color: rgba(0, 83, 102, 0.5) !important;
  box-shadow: none;
}

.bm-colorbox-body .bm-toggle.is-active {
  background-color: #005366 !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 6px 16px rgba(0, 83, 102, 0.14);
}

/* Colorbox popup – actions layout */
.bm-colorbox-body .bm-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.65rem;
}

/* CTA accoppiate (es. socio / socio+accompagnatore): stessa larghezza anche con etichette diverse */
.bm-colorbox-body .bm-event-actions__cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  flex: 0 1 100%;
}

.bm-colorbox-body .bm-event-actions__cta .bm-action-confirm {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  white-space: normal;
  text-align: center;
  text-wrap: balance;
  line-height: 1.2;
  padding: 0.7rem 1rem;
  hyphens: auto;
}

.bm-colorbox-body .bm-event-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  width: 100%;
}

.bm-colorbox-body .bm-event-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bm-colorbox-body .bm-event-selector[data-selector="pax"],
.bm-colorbox-body .bm-event-selector[data-selector="acc"],
.bm-colorbox-body .bm-event-selector[data-selector="nad"],
.bm-colorbox-body .bm-event-selector[data-selector="nmin"] {
  min-width: 260px;
}

.bm-colorbox-body .bm-event-selector .btn {
  width: 100%;
}

.bm-colorbox-body .bm-event-selector[data-selector="pax"] .btn,
.bm-colorbox-body .bm-event-selector[data-selector="acc"] .btn {
  max-width: 360px;
}

.bm-colorbox-body .bm-event-selector[data-selector="nad"] .btn,
.bm-colorbox-body .bm-event-selector[data-selector="nmin"] .btn {
  max-width: 120px;
}

/* Numeric selectors (adults/minors): horizontal row with wrap on narrow screens */
.bm-colorbox-body .bm-event-selector[data-selector="nad"],
.bm-colorbox-body .bm-event-selector[data-selector="nmin"] {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.bm-colorbox-body .bm-event-selector[data-selector="nad"] .bm-event-selector__label,
.bm-colorbox-body .bm-event-selector[data-selector="nmin"] .bm-event-selector__label {
  flex: 0 0 100%;
  text-align: center;
}

.bm-colorbox-body .bm-event-selector[data-selector="nad"] .btn,
.bm-colorbox-body .bm-event-selector[data-selector="nmin"] .btn {
  width: auto;
  min-width: 3.5rem;
  flex: 0 0 auto;
}

@media (max-width: 992px) {
  .bm-colorbox-body .bm-event-actions .btn {
    width: 100%;
    max-width: 420px;
  }

  .bm-colorbox-body .bm-event-actions__cta {
    max-width: 100%;
  }

  .bm-colorbox-body .bm-event-actions__cta .bm-action-confirm {
    max-width: none;
  }

  .bm-colorbox-body .bm-event-selector {
    width: 100%;
  }

  .bm-colorbox-body .bm-event-selector[data-selector="nad"] .btn,
  .bm-colorbox-body .bm-event-selector[data-selector="nmin"] .btn {
    width: auto;
    max-width: none;
    min-width: 3.25rem;
  }
}

.bm-colorbox-body .bm-minor-eta-panel {
  width: 100%;
  max-width: 420px;
  margin: 12px auto;
}

.bm-colorbox-body .bm-event-eta {
  margin-bottom: 12px;
  text-align: left;
}

.bm-colorbox-body .bm-event-eta__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  text-align: center;
}

.bm-colorbox-body .bm-event-eta__select {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: block;
}

.bm-colorbox-body .bm-select-minori.is-active {
  font-weight: 700;
  outline: 2px solid #333;
}

.bm-text-justify {
  text-align: justify;
}

.bm-text-alert {
  font-size: 1.25rem;
  color: #c0392b;
  text-align: center;
}

.bm-highlight-red {
  color: #c0392b;
}

.bm-btn-secondary {
  background-color: silver;
}

.bm-alert-warn {
  background-color: #fff3cd;
  color: #c0392b;
  padding: 0.75rem;
  font-weight: bold;
}

.bm-status-banner {
  text-align: center;
  font-size: 1.25rem;
  padding: 0.75rem;
  color: #fff;
  font-weight: bold;
}

.bm-status-banner--ok {
  background-color: #1e6b52;
}

.bm-status-banner--nok {
  background-color: #c0392b;
}

.bm-reca-intro {
  text-align: left;
  max-width: 720px;
  margin: 0 auto 1rem;
}

.lnkX {
  text-decoration: underline;
  cursor: pointer;
}

.lnkX:hover {
  color: #c0392b;
}

@media (max-width: 1200px) {
  .bmPrincipal {
    padding-left: clamp(1rem, 3vw, 40px);
    padding-right: clamp(1rem, 3vw, 40px);
  }
}

@media (max-width: 992px) {
  .bmPrincipal {
    min-height: 30vh;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Colorbox popup should not reserve viewport height */
  .bm-colorbox-body .bmPrincipal {
    min-height: auto;
  }

  .bmInputForm,
  .bmInputFormSmall {
    width: 100%;
    display: block;
    margin-right: 0;
  }

  .bmInputFormAlert {
    font-size: 14px;
  }

  .bmProject {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .bmProjectDesc {
    font-size: 1rem;
  }

  .bmLogoEvento,
  .bm-logo-event {
    width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1800px) {
  .bmLogoFesta {
    width: 60%;
  }
}

@media (max-width: 768px) {
  .bmPrincipal {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bmProject {
    min-height: 44px;
  }

  .bmProjectCate {
    display: block;
    width: 100%;
    margin: 0.35rem 0;
    padding: 0.65rem;
    min-height: 44px;
    box-sizing: border-box;
  }

  .bmNataleProject {
    width: 100%;
    max-width: 100%;
    min-width: unset;
    margin: 10px auto;
  }

  .bm-colorbox-body .bm-event-layout {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .bmLogoEvento,
  .bm-logo-event {
    width: 100%;
  }
}
