/* Gestió: ajuda contextual per a editors — 2026-08-30 */
.tm-help-tip{
  position:relative;
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  width:18px;
  height:18px;
  margin-left:5px;
  vertical-align:middle;
  z-index:40;
}
.tm-help-tip__button,
.tm-admin-content .tm-help-tip__button{
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:18px!important;
  min-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #725543!important;
  border-radius:50%!important;
  background:#fffaf0!important;
  color:#5d4030!important;
  box-shadow:none!important;
  font-family:Arial,sans-serif!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:16px!important;
  text-align:center!important;
  cursor:help!important;
  appearance:none!important;
}
.tm-help-tip__button:hover,
.tm-help-tip__button:focus-visible,
.tm-help-tip.is-open .tm-help-tip__button{
  background:#5d4030!important;
  color:#fff!important;
  outline:none!important;
}
.tm-help-tip__button:focus-visible{box-shadow:0 0 0 3px rgba(162,175,127,.52)!important}
.tm-help-tip__bubble[hidden]{display:none!important}
.tm-help-tip__bubble{
  position:absolute;
  left:50%;
  top:calc(100% + 8px);
  width:290px;
  max-width:calc(100vw - 32px);
  transform:translateX(-16px);
  box-sizing:border-box;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:9px!important;
  background:#2f211b!important;
  color:#fff!important;
  box-shadow:0 12px 28px rgba(25,15,10,.28)!important;
  font-family:Arial,sans-serif!important;
  font-size:14px!important;
  font-weight:400!important;
  line-height:1.42!important;
  letter-spacing:normal!important;
  text-align:left!important;
  white-space:normal!important;
  z-index:10000;
}
.tm-help-tip__bubble::before{
  content:"";
  position:absolute;
  left:10px;
  top:-6px;
  border-left:6px solid transparent;
  border-right:6px solid transparent;
  border-bottom:6px solid #2f211b!important;
}
/* El ? acompanya l'etiqueta: no crea files ni columnes noves. */
/* Les etiquetes normals de Gestió són grid. Quan contenen ajuda les convertim
   en una línia flexible i reservem una fila completa al control del formulari. */
.tm-admin-content label:has(> .tm-help-tip):not(.tm-check-row){
  display:flex!important;
  flex-wrap:wrap;
  align-items:center;
  column-gap:0;
  row-gap:6px;
}
.tm-admin-content label:has(> .tm-help-tip):not(.tm-check-row)>input,
.tm-admin-content label:has(> .tm-help-tip):not(.tm-check-row)>select,
.tm-admin-content label:has(> .tm-help-tip):not(.tm-check-row)>textarea{
  flex:0 0 100%;
  width:100%;
}
.tm-admin-form label>.tm-help-tip,
.tm-event-language-group legend>.tm-help-tip,
.tm-admin-panel h2>.tm-help-tip,
.tm-admin-panel h3>.tm-help-tip{display:inline-flex!important}
.tm-check-row>.tm-help-tip{margin-left:2px}
.tm-inline-actions>.tm-help-tip{margin-left:-2px;margin-right:4px}
.tm-help-link{white-space:nowrap}
/* Targetes del panell: ? discret a la cantonada, sense alterar l'enllaç. */
.tm-admin-card--help{position:relative}
.tm-admin-card--help .tm-admin-card-main{display:block;color:inherit;text-decoration:none;padding-right:28px}
.tm-admin-card--help>.tm-help-tip{position:absolute;right:13px;top:13px;margin:0}
.tm-admin-card--help>.tm-help-tip .tm-help-tip__bubble{left:auto;right:0;transform:none}
.tm-admin-card--help>.tm-help-tip .tm-help-tip__bubble::before{left:auto;right:4px}
.tm-admin-card--help:focus-within{border-color:rgba(162,175,127,.65)}
.tm-admin-card-main:focus-visible{outline:3px solid rgba(143,160,107,.75);outline-offset:4px;border-radius:8px}
/* Manual d'ajuda. */
.tm-help-intro{display:flex;align-items:flex-start;gap:12px;padding:15px 17px;border-radius:12px;background:#f0eae5;margin:0 0 22px}
.tm-help-intro .tm-help-tip{margin-top:2px}
.tm-help-manual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.tm-help-manual-card{border:1px solid #d8cdc5;border-radius:14px;padding:20px;background:#fff}
.tm-help-manual-card h2{margin:0 0 10px;font-size:1.35rem}
.tm-help-manual-card h3{margin:18px 0 8px;font-size:1rem}
.tm-help-manual-card p{margin:.45rem 0}
.tm-help-manual-card ol,.tm-help-manual-card ul{margin:.55rem 0 .2rem;padding-left:1.25rem}
.tm-help-manual-card li+li{margin-top:.35rem}
.tm-help-status-list{display:grid;gap:8px;margin-top:10px}
.tm-help-status-row{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:9px 10px;border-radius:8px;background:#f5f0ec}
.tm-help-note{margin-top:18px;padding:14px 16px;border-left:4px solid #8fa06b;background:#f4f6ec;border-radius:0 8px 8px 0}
@media(max-width:767px){
  .tm-help-tip{width:20px;height:20px;margin-left:6px}
  .tm-help-tip__button,.tm-admin-content .tm-help-tip__button{width:20px!important;min-width:20px!important;height:20px!important;min-height:20px!important;font-size:12px!important}
  .tm-help-tip__bubble{
    position:fixed;
    left:12px!important;
    right:12px!important;
    top:auto!important;
    bottom:16px!important;
    width:auto!important;
    max-width:none!important;
    transform:none!important;
    font-size:15px!important;
    padding:13px 14px;
  }
  .tm-help-tip__bubble::before{display:none}
  .tm-help-manual-grid{grid-template-columns:1fr}
  .tm-help-status-row{grid-template-columns:1fr}
  .tm-admin-card--help:hover,.tm-admin-card--help:focus-within{transform:none}
}


/* Butlletí públic: interrogants al costat de cada camp, sense alterar el formulari. */
.tm-mailing-page .tm-form-label-with-help{
  display:flex;
  align-items:center;
  gap:0;
  width:max-content;
  max-width:100%;
}
.tm-mailing-page .tm-form-label-with-help>label{
  margin:0;
}
.tm-mailing-page .tm-mailing-language-choice legend>.tm-form-label-with-help{
  display:inline-flex;
}
.tm-mailing-page .tm-mailing-consent-row{
  display:flex;
  align-items:flex-start;
  gap:6px;
}
.tm-mailing-page .tm-mailing-consent-row>label{
  flex:1 1 auto;
  min-width:0;
  margin:0;
}
.tm-mailing-page .tm-mailing-consent-row>.tm-help-tip{
  flex:0 0 auto;
  margin-top:1px;
}
.tm-mailing-page .tm-mailing-consent-row>.tm-help-tip .tm-help-tip__bubble{
  left:auto;
  right:0;
  transform:none;
}
.tm-mailing-page .tm-mailing-consent-row>.tm-help-tip .tm-help-tip__bubble::before{
  left:auto;
  right:4px;
}
