.fbnbc-box { border:1px solid #ddd; padding:16px; border-radius:12px; margin:12px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); background:#fff; }
.fbnbc-box h3 { margin-top:0; }
.fbnbc-input { padding:8px 10px; border:1px solid #ccc; border-radius:8px; margin:4px 0; }
.fbnbc-btn.outline { background:#fff; color:#222; margin-right: 2px;}
.fbnbc-grid { display:grid; gap:12px; }
.fbnbc-grid.two { grid-template-columns: 1fr 1fr; }
.fbnbc-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.fbnbc-grid.four { grid-template-columns: 1fr 1fr 1fr 1fr; }
.fbnbc-table { width:100%; border-collapse: collapse; margin:8px 0; }
.fbnbc-table th, .fbnbc-table td { border-bottom:1px solid #eee; padding:8px; text-align:left; }
.fbnbc-table thead th { background:#f9fafb; }
.fbnbc-pagination { display:flex; align-items:center; gap:8px; margin-top:8px; }
.fbnbc-list { margin:0; padding-left:18px; }
.fbnbc-badges .badge { display:inline-block; padding:4px 8px; border-radius:8px; background:#f1f5f9; margin-right:6px; margin-bottom:6px; font-size:12px; }
.fbnbc-notice { padding:10px 12px; border-radius:10px; margin:8px 0; }
.fbnbc-notice.info { background:#eef2ff; }
.fbnbc-notice.success { background:#ecfdf5; }
.fbnbc-notice.error { background:#fee2e2; }
.fbnbc-tabs .tab { margin-right:6px; }
.fbnbc-tabs .active { font-weight:700; text-decoration: underline; }
.fbnbc-card { border:1px solid #eee; border-radius:12px; padding:12px; background:#fff; }
.fbnbc-muted { color:#6b7280; font-size:.9em; }

/* ===== Fantabirilli NBC – Mini UI polish (aggiunta 0.2.1+) ===== */
.fbnbc-app {
  --fb-gap: 10px;
  --fb-radius: 10px;
  --fb-border: 1px solid #E6E6EA;
  --fb-bg: #fff;
  --fb-muted: #6b7280;
  --fb-accent: #2b59ff;
  --fb-accent-soft: rgba(43, 89, 255, .08);
  --fb-danger: #d64545;
  --fb-danger-soft: rgba(214,69,69,.1);
  --fb-shadow: 0 8px 24px rgba(0,0,0,.06);
  
  --fb-cat-np: #0ea5e9;           /* NP = blu/sky */
  --fb-cat-np-soft: rgba(14,165,233,.10);

  --fb-cat-n:  #f59e0b;           /* N = ambra */
  --fb-cat-n-soft:  rgba(245,158,11,.10);

  --fb-cat-m:  #10b981;           /* M = verde/emerald */
  --fb-cat-m-soft: rgba(16,185,129,.10);
  
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, sans-serif;
  color: #111827;
}

/* Wrapper & headings */
.fbnbc-wrap { background: var(--fb-bg); border: var(--fb-border); border-radius: 16px; box-shadow: var(--fb-shadow); padding: 16px; }
.fbnbc-wrap h2 { font-size: 20px; margin: 0 0 12px; }
.fbnbc-wrap h3 { font-size: 16px; margin: 16px 0 10px; }
.fbnbc-wrap h4 { font-size: 15px; margin: 16px 0 10px; }

/* Tabs */
.fbnbc-tabs { display: flex; gap: 6px; border-bottom: var(--fb-border); margin-bottom: 12px; flex-wrap: wrap; }
.fbnbc-tab { appearance: none; background: transparent; border: 0; padding: 10px 12px; border-radius: 10px 10px 0 0; color: var(--fb-muted); cursor: pointer; font-weight: 600; }
.fbnbc-tab:hover { color: #111827; background: #f7f7fb; }
.fbnbc-tab.active { color: #111827; background: #fff; border: var(--fb-border); border-bottom-color: #fff; }

/* Toolbar */
.fbnbc-toolbar { display: flex; gap: var(--fb-gap); align-items: center; margin: 8px 0 12px; flex-wrap: wrap; }
.fbnbc-label { font-size: 12px; padding-top: 20px; font-weight: bold; color: var(--fb-muted); display:block; margin-bottom: 6px; }

/* Inputs */
.fbnbc-input, .fbnbc-textarea, .fbnbc-select {
  width: 70%;
  max-width: 395px;
  padding: 10px 12px; border: var(--fb-border); border-radius: 10px; background: #fff;
  transition: box-shadow .2s, border-color .2s;
}
.fbnbc-input:focus, .fbnbc-textarea:focus, .fbnbc-select:focus {
  outline: none; border-color: var(--fb-accent);
  box-shadow: 0 0 0 4px var(--fb-accent-soft);
}
.fbnbc-textarea { min-height: 110px; }

/* Buttons */
.fbnbc-btn {
  appearance: none; border: 0; cursor: pointer; user-select: none;
  background: var(--fb-accent); color: #fff; padding: 8px 12px;
  border-radius: 10px; font-weight: 600; box-shadow: 0 4px 14px rgba(43,89,255,.15);
  transition: transform .05s ease, opacity .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.fbnbc-btn:hover { box-shadow: 0 6px 18px rgba(43,89,255,.22); }
.fbnbc-btn:active { transform: translateY(1px); }
.fbnbc-btn[disabled] { opacity: .55; cursor: not-allowed; }

.fbnbc-btn.ghost { background: #f3f4f6; color:#111827; box-shadow: none; }
.fbnbc-btn.ghost:hover { background:#e9eaee; }
.fbnbc-btn.danger { background: var(--fb-danger); box-shadow: 0 4px 14px rgba(214,69,69,.18); }
.fbnbc-btn.danger:hover { box-shadow: 0 6px 18px rgba(214,69,69,.25); }

/* Grid helpers */
.fbnbc-grid { display: grid; gap: var(--fb-gap); margin-bottom: 8px; }
.fbnbc-grid.two   { grid-template-columns: repeat(2, minmax(0,1fr)); }
.fbnbc-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.fbnbc-grid.six   { grid-template-columns: repeat(6, minmax(0,1fr)); }
@media (max-width: 980px){ .fbnbc-grid.six { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 680px){
  .fbnbc-grid.two, .fbnbc-grid.three, .fbnbc-grid.six { grid-template-columns: 1fr; }
  .fbnbc-input, .fbnbc-textarea { max-width: 100%; }
}

/* Tables */
.fbnbc-scroll { overflow:auto; border: var(--fb-border); border-radius: 12px; }
.fbnbc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.fbnbc-table th, .fbnbc-table td { padding: 10px 12px; white-space: nowrap; }
.fbnbc-table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 700; color:#111827; background:#f7f7fb; border-bottom: var(--fb-border);
}
.fbnbc-table tr td { border-bottom: var(--fb-border); background: #fff; }
.fbnbc-table tbody tr:nth-child(even) td { background: #fafbff; }
.fbnbc-table tbody tr:hover td { background: #f3f6ff; }

.fbnbc-sticky-head{ position:sticky; top:0; z-index:10; background:#fff; padding-top:.5rem; }
.fbnbc-kpi{ display:grid; gap:12px; margin:8px 0 16px; }
.fbnbc-kpi.four{ grid-template-columns:repeat(4,minmax(0,1fr)); }
.fbnbc-kpi .kpi{ border:1px solid #e5e7eb; border-radius:10px; padding:12px; }
.fbnbc-kpi .kpi .v{ font-weight:700; font-size:20px; line-height:1.2; }
.fbnbc-kpi .kpi .l{ color:#666; font-size:12px; }


/* Notices & Toasts */
.fbnbc-notice { padding:10px 12px; border-radius:10px; border: var(--fb-border); background:#f9fafb; color:#111827; }
.fbnbc-notice.info { background:#f3f6ff; border-color:#dfe6ff; }
.fbnbc-notice.success { background:#eefaf2; border-color:#cfeedd; }
.fbnbc-notice.error { background:#fff1f1; border-color:#ffd9d9; }

#fbnbc-toasts .fbnbc-toast { border-radius:12px; }

/* Small helpers */
.fbnbc-list { list-style:none; padding-left:0; margin: 8px 0; }
.fbnbc-list li { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border: var(--fb-border); border-radius:10px; background:#fff; margin-bottom:6px; }

.fbnbc-alert {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  padding: 12px 14px;
  border-radius: 10px;
  margin: 10px 0;
}
.fbnbc-alert a { text-decoration: underline; }
.fbnbc-alert--error { border-color: #fecaca; background:#fef2f2; color:#991b1b; }
.fbnbc-alert--warn  { border-color: #fde68a; background:#fffbeb; color:#92400e; }

.fbnbc-banner { padding:.5rem .75rem; border:1px solid #ddd; border-radius:6px; margin:.5rem 0; font-weight:600; }
.fbnbc-banner.locked { background:#f7f7f7; }
.fbnbc-grid { display:grid; gap:1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px){ .fbnbc-grid { grid-template-columns: 1fr; } }
.fbnbc-card { border:1px solid #eee; border-radius:8px; padding:1rem; }

/* ====== NEW: Modal, Toasts, Roster polish ====== */
.fbnbc-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; z-index: 9999; }
.fbnbc-modal { background: var(--fb-bg); border: var(--fb-border); border-radius: 14px; box-shadow: var(--fb-shadow); width: min(560px, 92vw); max-height: 86vh; display:flex; flex-direction:column; }
.fbnbc-modal__header { padding: 14px 16px; border-bottom: var(--fb-border); display:flex; align-items:center; justify-content:space-between; }
.fbnbc-modal__body { padding: 14px 16px; overflow:auto; }
.fbnbc-modal__footer { padding: 12px 16px; border-top: var(--fb-border); display:flex; gap:10px; justify-content:flex-end; }
.fbnbc-modal__close { background: transparent; border:0; font-size: 20px; cursor:pointer; }
.fbnbc-modal.fbnbc-modal--wide { width: 96vw !important;  max-width: 1200px !important; /* desktop comodo */ }
@media (max-width: 720px) {
  .fbnbc-modal.fbnbc-modal--wide { width: 98vw !important; /* mobile quasi full */ max-width: 98vw !important; }
}

#fbnbc-toasts { position: fixed; right: 16px; bottom: 16px; display:flex; flex-direction: column; gap: 10px; z-index: 9999; }
.fbnbc-toast { background: #111827; color:#fff; padding:10px 12px; border-radius:12px; box-shadow: var(--fb-shadow); display:flex; gap:8px; align-items:center; }
.fbnbc-toast.success { background:#065f46; }
.fbnbc-toast.error { background:#7f1d1d; }
.fbnbc-toast.info { background:#1f2937; }
.fbnbc-toast__close { background: transparent; border: 0; color:#fff; font-size: 18px; cursor:pointer; }
.fbnbc-toast .fbnbc-btn.ghost { background: rgba(255,255,255,.1); color:#fff; box-shadow:none; }

.fbnbc-roster-panel.is-drop { outline: 2px dashed var(--fb-accent); outline-offset: 4px; background: var(--fb-accent-soft); }
.fbnbc-roster-group { margin-bottom: 12px; }
.fbnbc-roster-head { display:flex; align-items:center; justify-content:space-between; font-weight:600; padding: 6px 8px; background:#f9fafb; border-radius:8px; margin-bottom: 6px; }
.fbnbc-table.compact th, .fbnbc-table.compact td { padding:6px 8px; }
.fbnbc-td-actions { text-align:right; }
.fbnbc-empty { padding: 8px 10px; color: var(--fb-muted); background:#f3f4f6; border-radius: 8px; }
.fbnbc-section-title { margin-bottom: 6px; }
.fbnbc-results li { display:flex; align-items:center; justify-content:space-between; padding:8px 10px; border: var(--fb-border); border-radius:10px; background: var(--fb-bg); margin-bottom:6px; }


.fbnbc-tabs { display:flex; gap:.5rem; margin:.5rem 0 1rem; }
.fbnbc-tab { padding:.4rem .8rem; border:1px solid #ddd; background:#fafafa; cursor:pointer; }
.fbnbc-tab.active { background:#fff; border-color:#bbb; font-weight:600; }
.fbnbc-card { border:1px solid #ddd; border-radius:8px; background:#fff; display:flex; flex-direction:column; }
.fbnbc-card__header { display:flex; justify-content:space-between; padding:.8rem; border-bottom:1px solid #eee; }
.fbnbc-card__body { padding:.8rem; display:grid; gap:.25rem; }
.fbnbc-card__footer { padding:.8rem; border-top:1px solid #eee; display:flex; gap:.5rem; }
.fbnbc-badge { font-size:.8rem; padding:.1rem .4rem; border:1px solid #ccc; border-radius:4px; }

.fbnbc-pill{display:flex; justify-content:space-between; align-items:center; border:1px solid #e5e5e5; border-radius:8px; padding:.4rem .6rem; margin-bottom:.4rem; background:#fff;}
.fbnbc-pill.selected{opacity:.6;}
.fbnbc-pill__actions .fbnbc-btn{margin-left:.25rem;}
.fbnbc-box{border:1px solid #eee; border-radius:8px; padding:.6rem; background:#fff; margin-bottom:.6rem;}
.fbnbc-box__title{font-weight:600; margin-bottom:.3rem;}
.fbnbc-row{display:flex; justify-content:space-between; align-items:center; padding:.25rem; border-bottom:1px dashed #eee;}
.fbnbc-row:last-child{border-bottom:0;}
.fbnbc-badge.ok{background:#e6ffed; border:1px solid #b7f5c6;}
.fbnbc-badge.warn{background:#fff7e6; border:1px solid #ffe0a6;}

.fbnbc-focus .fbnbc-card { margin-bottom: .8rem; }
.fbnbc-table { width:100%; border-collapse: collapse; background:#fff; }
.fbnbc-table th, .fbnbc-table td { padding:.5rem; border-bottom:1px solid #eee; text-align:left; }
.fbnbc-alert.info { background:#eef5ff; border:1px solid #cfe0ff; padding:.5rem .6rem; border-radius:8px; }
.fbnbc-alert.warn { background:#fff7e6; border:1px solid #ffe0a6; padding:.5rem .6rem; border-radius:8px; }
.fbnbc-alert.dirty{ background:#fff7e6; border:1px solid #ffe0a6; padding:.6rem .8rem; border-radius:8px; margin-bottom:.6rem; }
.fbnbc-pill__actions .fbnbc-btn[disabled]{ opacity:.5; cursor:not-allowed; }

.fbnbc-help{ font-size:12px; color:#6b7280; margin-top:4px; }

.fbnbc-help.error { color: #c0392b; font-size: .875rem; }
.fbnbc-input.error { border-color: #c0392b; outline-color: #c0392b; }

.fbnbc-grid.two { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.fbnbc-grid.three { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.fbnbc-grid.four { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.fbnbc-card { border:1px solid #e5e7eb; border-radius:10px; padding:12px; margin-top: 10px;}
.fbnbc-subtitle { font-weight:600; margin-bottom:6px; }
.fbnbc-help { font-size:12px; color:#6b7280; margin-top:4px; }
.fbnbc-muted { color:#6b7280; font-size:13px; margin:6px 0; }


.fbnbc-table th.fbnbc-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.fbnbc-table th.fbnbc-sortable:focus { outline: 2px solid var(--fbnbc-primary, #3b82f6); outline-offset: 2px; }
.fbnbc-sort { font-size: 11px; margin-left: 4px; opacity: .7; }

/* RosterBuilder – elenco atleti disponibili con scroll */
.fbnbc-results-scroll { max-height: 520px; }

/* Intestazioni ordinabili */
.fbnbc-results-table th.fbnbc-sortable { cursor: pointer; user-select: none; }
.fbnbc-results-table th.fbnbc-sortable.asc::after  { content: " ▲"; font-size: 12px; opacity: .7; }
.fbnbc-results-table th.fbnbc-sortable.desc::after { content: " ▼"; font-size: 12px; opacity: .7; }

/* RosterBuilder – color coding per categoria (lista disponibili) */
.fbnbc-results-table tr.fbnbc-cat-NP td { background: var(--fb-cat-np-soft); }
.fbnbc-results-table tr.fbnbc-cat-N  td { background: var(--fb-cat-n-soft); }
.fbnbc-results-table tr.fbnbc-cat-M  td { background: var(--fb-cat-m-soft); }
  .fbnbc-table--lineup tr.fbnbc-cat-NP td,
  .fbnbc-table--bench tr.fbnbc-cat-NP td { background: var(--fb-cat-np-soft); }
  .fbnbc-table--lineup tr.fbnbc-cat-N td,
  .fbnbc-table--bench tr.fbnbc-cat-N td { background: var(--fb-cat-n-soft); }
  .fbnbc-table--lineup tr.fbnbc-cat-M td,
  .fbnbc-table--bench tr.fbnbc-cat-M td { background: var(--fb-cat-m-soft); }


/* Evidenzia il bordo sinistro per maggior immediatezza */
.fbnbc-results-table tr.fbnbc-cat-NP td:first-child { border-left: 4px solid var(--fb-cat-np); }
.fbnbc-results-table tr.fbnbc-cat-N  td:first-child { border-left: 4px solid var(--fb-cat-n); }
.fbnbc-results-table tr.fbnbc-cat-M  td:first-child { border-left: 4px solid var(--fb-cat-m); }
  .fbnbc-table--lineup tr.fbnbc-cat-NP td:first-child,
  .fbnbc-table--bench tr.fbnbc-cat-NP td:first-child { border-left: 4px solid var(--fb-cat-np); }
  .fbnbc-table--lineup tr.fbnbc-cat-N td:first-child,
  .fbnbc-table--bench tr.fbnbc-cat-N td:first-child { border-left: 4px solid var(--fb-cat-n); }
  .fbnbc-table--lineup tr.fbnbc-cat-M td:first-child,
  .fbnbc-table--bench tr.fbnbc-cat-M td:first-child { border-left: 4px solid var(--fb-cat-m); }


/* Hover leggero (solo desktop) */
@media (hover:hover){
  .fbnbc-results-table tr.fbnbc-cat-NP:hover td { background: rgba(14,165,233,.16); }
  .fbnbc-results-table tr.fbnbc-cat-N:hover  td { background: rgba(245,158,11,.16); }
  .fbnbc-results-table tr.fbnbc-cat-M:hover  td { background: rgba(16,185,129,.16); }
}

/* Legend cromatica (opzionale ma utile) */
.fbnbc-cat-legend { display:flex; gap:10px; align-items:center; margin:6px 0 4px; color: var(--fb-muted); font-size:12px; }
.fbnbc-cat-legend .chip { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; border:1px solid transparent; }
.fbnbc-cat-legend .fbnbc-chip-NP { color: var(--fb-cat-np); background: var(--fb-cat-np-soft); border-color: var(--fb-cat-np); }
.fbnbc-cat-legend .fbnbc-chip-N  { color: var(--fb-cat-n);  background: var(--fb-cat-n-soft);  border-color: var(--fb-cat-n); }
.fbnbc-cat-legend .fbnbc-chip-M  { color: var(--fb-cat-m);  background: var(--fb-cat-m-soft);  border-color: var(--fb-cat-m); }
  .fbnbc-bonus-legend { display:flex; gap:10px; align-items:center; margin:8px 0; color: var(--fb-muted); font-size:12px; }
  .fbnbc-chip { display:inline-flex; align-items:center; gap:6px; padding:2px 8px; border-radius:999px; border:1px solid transparent; font-size:12px; font-weight:600; }
  .fbnbc-chip--athlete { color: var(--fb-accent); background: var(--fb-accent-soft); border-color: var(--fb-accent); }
  .fbnbc-chip--reason { border-color: var(--fb-border); }
  .fbnbc-bonus-details { margin-top:6px; display:flex; flex-direction:column; gap:6px; }
  .fbnbc-bonus-item { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12px; }
  .fbnbc-bonus-item__delta { font-weight:600; color:#111827; }


/* === RosterBuilder – Pulsante "Aggiungi" colorato per categoria === */
/* Base */
.fbnbc-results-table .fbnbc-td-actions .fbnbc-btn { min-width: 92px; /* coerente con UI, evita "salti" */ }

/* NP */
.fbnbc-results-table tr.fbnbc-cat-NP .fbnbc-td-actions .fbnbc-btn {
  background: var(--fb-cat-np);
  box-shadow: 0 4px 14px rgba(14,165,233,.22);
}
@media (hover:hover){
  .fbnbc-results-table tr.fbnbc-cat-NP .fbnbc-td-actions .fbnbc-btn:hover {
    box-shadow: 0 6px 18px rgba(14,165,233,.30);
  }
}
.fbnbc-results-table tr.fbnbc-cat-NP .fbnbc-td-actions .fbnbc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--fb-cat-np-soft), 0 6px 18px rgba(14,165,233,.30);
}

/* N */
.fbnbc-results-table tr.fbnbc-cat-N .fbnbc-td-actions .fbnbc-btn {
  background: var(--fb-cat-n);
  box-shadow: 0 4px 14px rgba(245,158,11,.22);
}
@media (hover:hover){
  .fbnbc-results-table tr.fbnbc-cat-N .fbnbc-td-actions .fbnbc-btn:hover {
    box-shadow: 0 6px 18px rgba(245,158,11,.30);
  }
}
.fbnbc-results-table tr.fbnbc-cat-N .fbnbc-td-actions .fbnbc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--fb-cat-n-soft), 0 6px 18px rgba(245,158,11,.30);
}

/* M */
.fbnbc-results-table tr.fbnbc-cat-M .fbnbc-td-actions .fbnbc-btn {
  background: var(--fb-cat-m);
  box-shadow: 0 4px 14px rgba(16,185,129,.22);
}
@media (hover:hover){
  .fbnbc-results-table tr.fbnbc-cat-M .fbnbc-td-actions .fbnbc-btn:hover {
    box-shadow: 0 6px 18px rgba(16,185,129,.30);
  }
}
.fbnbc-results-table tr.fbnbc-cat-M .fbnbc-td-actions .fbnbc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--fb-cat-m-soft), 0 6px 18px rgba(16,185,129,.30);
}

/* Stato disabilitato (eredita opacity dal tema) */
.fbnbc-results-table .fbnbc-td-actions .fbnbc-btn[disabled] {
  filter: saturate(.9) brightness(.98);
}



/* === Emphasis for current card in EventsIndex carousel === */
.fbnbc-carousel.desktop .fbnbc-carousel__item {
  transform: scale(.94);
  opacity: .72;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease, filter .18s ease;
}
.fbnbc-carousel.desktop .fbnbc-carousel__item .fbnbc-card {
  transition: box-shadow .18s ease, border-color .18s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.fbnbc-carousel.desktop .fbnbc-carousel__item.current {
  transform: scale(1.08);
  opacity: 1;
  z-index: 2;
}
.fbnbc-carousel.desktop .fbnbc-carousel__item.current .fbnbc-card {
  box-shadow: 0 10px 24px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
}
/* opzionale: sfumiamo leggermente le laterali senza intaccare troppo la leggibilità */
.fbnbc-carousel.desktop .fbnbc-carousel__item.prev .fbnbc-card,
.fbnbc-carousel.desktop .fbnbc-carousel__item.next .fbnbc-card {
  filter: saturate(.95) contrast(.98);
}
/* frecce sempre sopra alle card */
.fbnbc-carousel__nav { z-index: 3; }

/* Mobile: la card è unica, alziamo appena l’effetto */
@media (max-width: 800px){
  .fbnbc-carousel.mobile .fbnbc-card {
    box-shadow: 0 8px 22px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
  }
}


/* ===== Mobile helpers ===== */
.fbnbc-mobile-only { display: none; }
.fbnbc-desktop-only { display: inline-block; }
@media (max-width: 800px){
  .fbnbc-mobile-only { display: inline-flex; }
  .fbnbc-desktop-only { display: none !important; }
  /* One-at-a-time view when [fb_eventi] and [fb_evento] coexist */
  #fb-events-index[data-coexist="1"][data-active="0"],
  #fb-event-focus[data-coexist="1"][data-active="0"] { display: none !important; }
  /* Touch targets & spacing */
  .fbnbc-btn { padding: 12px 10px; margin-left: 5px;}
  .fbnbc-toolbar { gap: 8px; }
}

/* CollapsibleCard simple affordance (header clickable) */
.fbnbc-card__header[role="button"] { cursor: pointer; }

/* === Carousel for EventsIndex === */
.fbnbc-carousel { position: relative; display: flex; align-items: stretch; justify-content: center; gap: 1rem; }
/*.fbnbc-carousel .fbnbc-card { width: 100%; }*/
.fbnbc-carousel.desktop .fbnbc-carousel__item { flex: 0 1 28rem; max-width: 28rem; }
.fbnbc-carousel.desktop .fbnbc-carousel__item.current { transform: translateY(-2px); }
.fbnbc-carousel__spacer { flex: 0 1 28rem; }
.fbnbc-carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 9999px; border: 1px solid rgba(0,0,0,.08); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; }
.fbnbc-carousel__nav.left { left: .25rem; }
.fbnbc-carousel__nav.right { right: .25rem; }
.fbnbc-carousel__nav[disabled] { opacity: .35; cursor: default; pointer-events: none; }
.fbnbc-carousel.mobile { display: grid; grid-template-columns: 1fr; }
.fbnbc-carousel.mobile .fbnbc-carousel__viewport { overflow: hidden; }
.fbnbc-carousel.mobile .fbnbc-card { max-width: 28rem; margin: 0 auto; }

@media (max-width: 800px){
  /* evitiamo layout grid attorno al carousel */
  #fb-events-index .fbnbc-grid { display: block; }
}

/* Titolare senza voto (sostituito) */
.fbnbc-novote { font-weight: 700; color: #dc2626; }

/* Evidenza subentrato (panchina) */
.fbnbc-used { font-weight: 700; color: #059669; } /* verde “ok” */

/* Piccola appendice categoria accanto al nome */
.fbnbc-cat { opacity: .7; font-size: .875em; margin-left: .25rem; }

/* Affinamenti mobile per il blocco risultati */
@media (max-width: 800px){
  .fbnbc-results--mobile .fbnbc-table th,
  .fbnbc-results--mobile .fbnbc-table td { padding: 6px 8px; }
  .fbnbc-results--mobile .fbnbc-box__title { margin-bottom: 6px; }
}

/* === Teams Tab: layout mobile a colonna === */
@media (max-width: 800px){
  .fbnbc-teams-tab .fbnbc-grid.two,
  .fbnbc-teams-tab .fbnbc-grid.three { grid-template-columns: 1fr; }

  .fbnbc-teams-tab .fbnbc-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* pill della rosa: contenuto sopra, azioni sotto, più leggibile */
  .fbnbc-teams-tab .fbnbc-pill { flex-direction: column; align-items: flex-start; }
  .fbnbc-teams-tab .fbnbc-pill__actions { margin-top: 6px; }
  
  .fbnbc-teams-tab .fbnbc-scroll{
    min-height: 220px;          /* aumenta/abbassa a piacere: 200–280px */
    max-height: 50svh;          /* limita e forza lo scroll */
    overflow-y: auto;           /* già presente, lo ribadiamo qui */
    -webkit-overflow-scrolling: touch; /* scorrimento fluido iOS */
  }
}



/* ===== Banner conferma invio ===== */
.fbnbc-banner.success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #064e3b;
  display: flex; align-items: center; gap: 8px;
}
.fbnbc-banner__icon { font-weight: 700; }

/* ===== Chip stato a destra del bottone (desktop) ===== */
.fbnbc-submitbar-desktop { display:flex; align-items:center; gap:.5rem; margin-top:.5rem; }
.fbnbc-statechip { font-size:12px; color: var(--fb-muted); }
.fbnbc-statechip.ok { color:#065f46; font-weight:600; }

/* ===== Colori categorie su pill/righe selezionate ===== */
/* Variabili già presenti:
   --fb-cat-np / --fb-cat-np-soft, --fb-cat-n / --fb-cat-n-soft, --fb-cat-m / --fb-cat-m-soft */

.fbnbc-pill.fbnbc-cat-NP { border-left: 4px solid var(--fb-cat-np); background: var(--fb-cat-np-soft); }
.fbnbc-pill.fbnbc-cat-N  { border-left: 4px solid var(--fb-cat-n);  background: var(--fb-cat-n-soft); }
.fbnbc-pill.fbnbc-cat-M  { border-left: 4px solid var(--fb-cat-m);  background: var(--fb-cat-m-soft); }

.fbnbc-row.fbnbc-cat-NP { border-left: 4px solid var(--fb-cat-np); background: var(--fb-cat-np-soft); }
.fbnbc-row.fbnbc-cat-N  { border-left: 4px solid var(--fb-cat-n);  background: var(--fb-cat-n-soft); }
.fbnbc-row.fbnbc-cat-M  { border-left: 4px solid var(--fb-cat-m);  background: var(--fb-cat-m-soft); }

/* Pulsanti azione dentro la pill (solo in quel contesto) */
.fbnbc-pill.fbnbc-cat-NP .fbnbc-btn:not([disabled]) { background: var(--fb-cat-np); color:#fff; }
.fbnbc-pill.fbnbc-cat-N  .fbnbc-btn:not([disabled]) { background: var(--fb-cat-n);  color:#fff; }
.fbnbc-pill.fbnbc-cat-M  .fbnbc-btn:not([disabled]) { background: var(--fb-cat-m);  color:#fff; }
.fbnbc-pill .fbnbc-btn[disabled] { opacity:.55; cursor:not-allowed; }


/* ===== RosterLineupEditor: layout mobile a singola colonna ===== */
@media (max-width: 800px){
  /* Tutte le griglie a 2-3-4 colonne dell’editor diventano una colonna */
  .fbnbc-lineup .fbnbc-grid.two,
  .fbnbc-lineup .fbnbc-grid.three,
  .fbnbc-lineup .fbnbc-grid.four{
    grid-template-columns: 1fr !important;
  }

  /* Spaziatura un filo più ariosa tra i blocchi */
  .fbnbc-lineup .fbnbc-box{
    margin-bottom: .75rem;
  }

  /* Righe “selezionati” più elastiche */
  .fbnbc-lineup .fbnbc-row{
    flex-wrap: wrap;
    gap: .4rem;
  }
  .fbnbc-lineup .fbnbc-row__actions{
    display: flex;
    gap: .25rem;
    justify-content: flex-start;
  }

  /* Le pill della lista rosa impilate con azioni sotto al nome */
  .fbnbc-lineup .fbnbc-pill{
    flex-direction: column;
    align-items: flex-start;
    gap: .3rem;
  }
  .fbnbc-lineup .fbnbc-pill__actions{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
  }

}
