/**
 * Pagina assistenza (help.php) — titoli magenta senza asset --brand-box-short,
 * campi in stile brand arancione, pulsanti Bootstrap con gradient come .btn-action.
 */

/* FAQ: solo qui (custom.css ha .accordion-button:not(.collapsed) verde globale) */
.help-faq-wrap .accordion-button {
  text-align: center !important;
}

.help-faq-wrap .accordion-body {
  text-align: left;
  font-size: 1rem;
  color: #9d4b24;
}

/* Stato chiuso / aperto: tema arancione — batte custom.css .accordion-button:not(.collapsed) */
.help-faq-wrap .accordion-button.collapsed,
.help-faq-wrap .accordion-button:not(.collapsed) {
  font-family: 'BebasNeue Bold', 'BebasNeue Book', Arial, sans-serif;
  font-size: 1.18rem;
  color: #c0400a !important;
  background-color: rgba(255, 248, 240, 0.98) !important;
  border-color: rgba(232, 90, 26, 0.45) !important;
  box-shadow: none !important;
}

.help-faq-wrap .accordion-button:not(.collapsed) {
  background-color: rgba(232, 90, 26, 0.2) !important;
  color: #903308 !important;
  border-color: rgba(232, 90, 26, 0.55) !important;
}

.help-faq-wrap .accordion-button:focus {
  border-color: rgba(232, 90, 26, 0.65) !important;
  box-shadow: 0 0 0 0.2rem rgba(232, 90, 26, 0.22) !important;
}

.help-faq-wrap .accordion-button::after {
  filter: opacity(0.85);
}

.help-page-shell {
  --help-type-min: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 10px 24px;
}

/* Titoli sezione: niente immagine di sfondo (ex .help-title-box + --brand-box-short) */
.help-title-box {
  width: 100%;
  max-width: min(90vw, 560px);
  margin: 0 auto 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: none !important;
  background-image: none !important;
  aspect-ratio: auto;
  padding: 0.5rem 14px 0.35rem;
  box-sizing: border-box;
}

/* Stesso spirito di .registration-brand-title (registration-brand.css) */
.help-title-text {
  margin: 0;
  font-family: 'BebasNeue Bold', 'BebasNeue Book', Arial, sans-serif;
  font-size: clamp(1.35rem, 4vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: 0.04em;
  text-align: center;
  color: #bf066c;
  text-transform: uppercase;
}

.help-faq-wrap {
  max-width: 840px;
  margin: 0 auto;
}

.help-faq-wrap .accordion-item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(232, 90, 26, 0.35);
  margin-bottom: 10px;
}

/* --- Form: campi arancione (come .registration-brand-field) --- */
#help-form .form-control,
#help-form textarea {
  border-radius: 12px !important;
}

#help-form .form-label {
  font-family: 'BebasNeue Book', 'BebasNeue Light', Arial, sans-serif !important;
  color: #e85a1a !important;
  text-shadow: none !important;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem !important;
  font-size: max(var(--help-type-min), 0.95rem) !important;
}

#help-form .form-label.visually-hidden {
  margin-bottom: 0 !important;
}

#help-form .form-control,
#help-form .form-select,
#help-form textarea {
  border-radius: 12px !important;
  border: 2px solid #e85a1a !important;
  color: #1a1a1a !important;
  background-color: #ffffff !important;
  font-family: 'BebasNeue Bold', 'BebasNeue Book', 'BebasNeue Light', Arial, sans-serif !important;
  font-weight: 600 !important;
  font-size: max(var(--help-type-min), 0.95rem) !important;
  letter-spacing: 0.03em !important;
}

#help-form .form-control {
  height: auto !important;
  min-height: 2.35rem !important;
  padding: 0.38rem 0.85rem !important;
}

#help-form textarea {
  min-height: 108px !important;
}

#help-form .form-control::placeholder,
#help-form textarea::placeholder {
  color: #e85a1a !important;
  opacity: 1 !important;
}

/* Batte custom.css input:focus (verde) */
#help-form .form-control:focus,
#help-form .form-select:focus,
#help-form textarea:focus,
#help-form input:focus,
#help-form textarea:focus {
  border-color: #d14a0a !important;
  box-shadow: 0 0 0 3px rgba(232, 90, 26, 0.22) !important;
  outline: none !important;
}

#help-form .form-check-label {
  color: #e85a1a !important;
  font-size: max(var(--help-type-min), 0.92rem) !important;
  font-family: 'BebasNeue Book', 'BebasNeue Light', Arial, sans-serif !important;
  text-shadow: none !important;
  letter-spacing: 0.02em;
  line-height: 1.35 !important;
}

#help-form .form-check-label a {
  color: #c0400a !important;
  font-weight: 700;
}

#help-form .row.g-3 {
  --bs-gutter-x: 0.55rem;
  --bs-gutter-y: 0.35rem;
}

/* Bloc supporto: carta bianca sullo sfondo illustrazione (leggibilità) */
.help-support-panel {
  width: 100%;
  max-width: min(680px, 100%);
  margin: 2.5rem auto 1.5rem;
  padding: 1.15rem 0.9rem 1.35rem;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-sizing: border-box;
}

.help-support-panel .help-title-box--support {
  margin-bottom: 0.5rem;
  padding-top: 0.2rem;
}

.help-form-wrapper {
  max-width: 620px;
  margin: 0 auto;
}

.help-support-panel .help-form-wrapper {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

#help-form .error-message,
#help-form .invalid-feedback {
  color: #842029 !important;
  background-color: #f8d7da !important;
  border: 1px solid #f5c2c7 !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem 1rem !important;
  margin: 0.5rem 0.1rem 0.8rem 0.1rem !important;
  font-weight: 400;
  text-shadow: none !important;
}

#help-feedback {
  border-radius: 12px;
  padding: 0.7rem 1rem;
  margin: 0 0.1rem 0.8rem 0.1rem;
  font-size: 0.96rem;
  line-height: 1.3;
  text-align: center;
}

#help-feedback.help-feedback-success {
  background-color: #d1e7dd;
  border: 1px solid #badbcc;
  color: #0f5132;
}

#help-feedback.help-feedback-error {
  background-color: #f8d7da;
  border: 1px solid #f5c2c7;
  color: #842029;
}

#help-form .form-check-input {
  flex-shrink: 0;
  width: 1.08em !important;
  height: 1.08em !important;
  margin-top: 0.28em !important;
  border-radius: 4px !important;
  border: 1px solid #c8c8c8 !important;
  background-color: #fff !important;
  accent-color: #bf066c;
}

#help-form .form-check-input:checked {
  background-color: #bf066c !important;
  border-color: #bf066c !important;
}

#help-form .form-check-input:focus {
  box-shadow: 0 0 0 2px rgba(191, 6, 108, 0.25) !important;
}

/*
 * Pulsanti: gradient rosa (custom.css usa immagini su .btn-invia / .btn-regolamento — qui solo .btn-action).
 * NB: non usare background-image: none dopo il gradient o si annulla il linear-gradient.
 */
.help-page-shell .btn.btn-action,
.help-page-shell a.btn.btn-action {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 191, 6, 108;
  --btn-action-dark: #bf066c;
  --btn-action-light: #f21c85;
  --btn-action-shadow: rgba(0, 0, 0, 0.28);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background-color: transparent !important;
  background-image: linear-gradient(90deg, var(--btn-action-dark) 0%, var(--btn-action-light) 100%) !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  color: #ffffff !important;
  font-family: 'BebasNeue Bold', 'BebasNeue Book', Arial, sans-serif !important;
  font-size: clamp(1rem, 1.25vw, 1.45rem) !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  padding: 0.45rem 0.9rem !important;
  text-decoration: none !important;
  text-shadow: none !important;
  box-shadow: 4px 6px 0 var(--btn-action-shadow) !important;
  transition: transform 0.12s ease, filter 0.16s ease, box-shadow 0.16s ease !important;
  min-width: unset !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
}

.help-page-shell .btn.btn-action:hover,
.help-page-shell .btn.btn-action:focus,
.help-page-shell a.btn.btn-action:hover,
.help-page-shell a.btn.btn-action:focus {
  color: #ffffff !important;
  filter: brightness(1.03);
  transform: none;
  background-image: linear-gradient(90deg, var(--btn-action-dark) 0%, var(--btn-action-light) 100%) !important;
}

.help-page-shell .btn.btn-action:active,
.help-page-shell a.btn.btn-action:active {
  color: #ffffff !important;
  transform: translate(1px, 1px) !important;
  box-shadow: 3px 4px 0 var(--btn-action-shadow) !important;
  background-image: linear-gradient(90deg, var(--btn-action-dark) 0%, var(--btn-action-light) 100%) !important;
}

.help-page-shell .btn.btn-action:focus-visible,
.help-page-shell a.btn.btn-action:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 4px rgba(191, 6, 108, 0.24), 4px 6px 0 var(--btn-action-shadow) !important;
}

.help-page-shell .btn.btn-lg.btn-action,
.help-page-shell a.btn.btn-lg.btn-action {
  min-height: 52px !important;
  padding: 0.55rem 1.15rem !important;
}

@media (max-width: 767.98px) {
  .help-title-box {
    width: 100%;
    max-width: min(92vw, 560px);
    margin-bottom: 0.55rem;
    padding: 0.4rem 10px 0.25rem;
  }

  .help-title-text {
    font-size: clamp(1.15rem, 5vw, 1.85rem);
  }

  .help-faq-wrap .accordion-button {
    font-size: 1.02rem;
  }

  .help-faq-wrap .accordion-body {
    font-size: 0.93rem;
  }

  #help-form .form-control {
    min-height: 2.25rem !important;
    font-size: max(var(--help-type-min), 0.9rem) !important;
  }

  #help-form textarea {
    min-height: 96px !important;
    font-size: max(var(--help-type-min), 0.9rem) !important;
  }

  #help-form .form-label {
    margin-bottom: 0.15rem !important;
    font-size: max(var(--help-type-min), 0.88rem) !important;
  }

  .help-support-panel {
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    padding: 1rem 0.65rem 1.15rem;
    max-width: min(100%, calc(100vw - 20px));
  }

  .help-form-wrapper {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #help-form .row.g-3 {
    --bs-gutter-x: 0.45rem;
    --bs-gutter-y: 0.3rem;
  }

  #help-form .col-12,
  #help-form .col-md-6,
  #help-form .col-8,
  #help-form .col-4,
  #help-form .col-sm-9,
  #help-form .col-sm-3,
  #help-form .col-md-4,
  #help-form .col-md-2 {
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  .help-page-shell .btn.btn-lg.btn-action,
  .help-page-shell a.btn.btn-lg.btn-action {
    min-height: 46px !important;
    font-size: clamp(0.92rem, 3.9vw, 1.18rem) !important;
    padding: 0.42rem 0.75rem !important;
  }
}
