/* Banca Malatestiana – app layout (eventi) */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.RedText,
.bm-alert-error {
  font-weight: 700;
  color: #c0392b;
  margin-top: 0.75rem;
}

.bm-alert-success {
  font-weight: 600;
  color: #1e6b52;
  margin-top: 0.75rem;
}

.bm-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

.bm-main {
  flex: 1 0 auto;
  width: 100%;
  padding-top: 5.5rem;
  padding-bottom: 2rem;
}

.bm-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.bm-site-footer {
  flex-shrink: 0;
  margin-top: auto;
}

.bm-hero {
  text-align: center;
  padding: 1rem 1.25rem 0.5rem;
}

.bm-hero img,
.bmLogoEvento {
  width: 100%;
  max-width: 1280px;
  height: auto;
}

.bm-form-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 83, 102, 0.12);
  padding: 1.75rem 2rem;
  margin: 1.5rem auto 2rem;
  max-width: 720px;
  text-align: center;
}

.bm-form-card--wide {
  max-width: 900px;
  text-align: left;
}

.bm-form-card h1,
.bm-form-card h2 {
  font-size: 1.35rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.bm-form-row {
  margin-bottom: 1rem;
  text-align: left;
}

.bm-form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #005366;
}

.bm-form-actions {
  margin-top: 1.5rem;
  text-align: center;
}

.bm-form-actions .btn-default {
  margin: 0.25rem 0.5rem;
  min-height: 44px;
  min-width: 140px;
}

.bm-code-input {
  max-width: 420px;
  margin: 0.75rem auto;
  display: block;
  width: 100%;
}

.bmPrincipal {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  text-align: left;
}

.bm-page .bmPrincipal {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bm-page .bmPrincipal .bm-form-card {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.bmPrincipal .data:not(.bm-form-card) {
  margin-left: 0;
  padding: 1rem 0;
}

.bm-input-block {
  display: block;
  width: 100%;
  max-width: 480px;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.bm-privacy-block {
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: justify;
  margin: 1.5rem 0;
}

.bm-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
}

.bm-checkbox-row input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.btn-default:focus-visible,
.bmPrivacy:focus-visible {
  outline: 2px solid #ffba3a;
  outline-offset: 2px;
}

.bmPrivacy {
  cursor: pointer;
  text-decoration: underline;
  color: #005366;
}

.bmPrivacy:hover {
  color: #ffba3a;
}

.bm-input-euro {
  text-align: right;
  max-width: 200px;
}

.bm-input-date {
  cursor: pointer;
  background-color: #fff;
}

.bm-field-error {
  display: block;
  font-size: 0.875rem;
  color: #c0392b;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

.bm-field-hint {
  display: block;
  font-size: 0.8125rem;
  color: #666;
  margin-top: 0.25rem;
}

.bm-field-filename {
  display: block;
  font-size: 0.875rem;
  color: #005366;
  margin-top: 0.35rem;
  font-weight: 600;
}

.btn.bm-btn-loading,
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Legacy public pages (BMSW, Natale, Assemblea) */
.bm-legacy-shell {
  padding-top: 5.5rem;
  text-align: center;
}

.bm-logo-event {
  width: 50%;
  max-width: 480px;
  height: auto;
}

.bm-form-field-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  max-width: 720px;
  margin: 0.75rem auto 1rem;
}

.bm-form-field-group .bm-input-block,
.bm-form-field-group .form-control {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.bm-form-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  color: #fff;
}

.bm-event-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  text-align: left;
}

.bm-event-layout__content {
  flex: 1 1 280px;
  min-width: 0;
  padding-left: 0;
}

.bm-event-layout__media {
  flex: 0 1 400px;
  min-width: 0;
  text-align: center;
}

.bm-event-image {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.bm-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.bm-event-card {
  max-width: 900px;
  margin: 1rem auto;
  padding: 1rem;
  border: 3px solid #005366;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.bm-event-card .bm-privacy-block {
  font-size: 0.625rem;
  line-height: 1.45;
}

.bm-link-action,
.spanLink {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.65rem 1rem;
  cursor: pointer;
}

.spanLink:hover {
  color: orange;
}

.bm-docs-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5.5rem 1.5rem 2rem;
  text-align: left;
}

.bm-input-block,
.bm-form-card .form-control,
.bmPrincipal .form-control {
  font-size: 16px;
}

#colorbox,
#cboxContent,
#cboxLoadedContent {
  max-width: 100vw;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  .bm-main {
    padding-top: 4.5rem;
  }

  .bm-legacy-shell {
    padding-top: 4.5rem;
  }

  .bm-docs-shell {
    padding-top: 4.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bm-form-card {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 1.25rem 1rem;
  }

  .bmPrincipal {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .bmInputForm,
  .bmInputFormSmall {
    width: 100% !important;
    max-width: 100%;
    display: block !important;
  }

  .bmPrincipal .form-control.search-input,
  .bm-form-card .form-control.search-input {
    width: 100% !important;
    display: block !important;
    max-width: 100%;
    min-height: 44px;
  }

  .bm-form-field-group {
    grid-template-columns: 1fr;
  }

  .bm-logo-event {
    width: 80%;
    max-width: 100%;
  }

  .bm-event-layout {
    flex-direction: column-reverse;
  }

  .bm-event-layout__content {
    padding-left: 0;
  }

  .bm-event-actions .btn-default {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 576px) {
  .bm-form-actions .btn-default {
    width: 100%;
    margin: 0.35rem 0;
    max-width: none;
  }

  .bm-logo-event {
    width: 100%;
  }
}
