
/* Front-end restyling 3.11.12: solo visual, nessuna modifica alla logica */
.htsp-app,.htsp-home-matches,.htsp-section{font-family:inherit;color:#0a1a37}
.htsp-app{max-width:1440px;margin:0 auto}
.htsp-content{margin-top:8px}

/* FILTRI */
.htsp-filters{
  display:grid;
  grid-template-columns:repeat(4,minmax(170px,1fr)) auto;
  gap:18px;
  align-items:end;
  margin:18px 0 28px;
  padding:22px 26px;
  background:linear-gradient(180deg,#f8fbff 0%,#f2f6fc 100%);
  border:1px solid #dbe6f2;
  border-radius:16px;
  box-shadow:0 10px 28px rgba(10,26,55,.06);
}
.htsp-field{display:flex;flex-direction:column;gap:8px;min-width:0;font-size:13px;font-weight:700;color:#4f617e}
.htsp-field span{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#5f7090}
.htsp-field select{
  height:48px;
  border:1px solid #d4deeb;
  background:#fff;
  border-radius:10px;
  padding:8px 14px;
  color:#0a1a37;
  font-size:15px;
  font-weight:700;
  box-shadow:0 2px 8px rgba(10,26,55,.03) inset;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.htsp-field select:hover{border-color:#b7c9df}
.htsp-field select:focus{outline:none;border-color:#1b57c8;box-shadow:0 0 0 4px rgba(27,87,200,.12)}
.htsp-apply{
  align-self:end;
  height:48px;
  min-width:146px;
  padding:0 22px;
  border:0;
  border-radius:10px;
  background:linear-gradient(180deg,#ffd633 0%,#f2c100 100%);
  color:#081931;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(242,193,0,.28);
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.htsp-apply:hover{transform:translateY(-1px);filter:brightness(1.02);box-shadow:0 12px 24px rgba(242,193,0,.34)}
.htsp-apply:active{transform:translateY(0)}

/* CARD RIASSUNTIVE */
.htsp-summary-grid,.htsp-home-match-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.htsp-match-card,.htsp-home-match-card{
  position:relative;
  background:#fff;
  border:1px solid #dbe5f1;
  border-top:5px solid #1450bb;
  border-radius:16px;
  padding:24px 28px 22px;
  min-height:220px;
  box-shadow:0 10px 28px rgba(10,26,55,.06);
  overflow:hidden;
}
.htsp-match-card:before,.htsp-home-match-card:before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(20,80,187,.02) 0%,rgba(20,80,187,0) 90%);
  pointer-events:none;
}
.htsp-card-kicker,.htsp-home-card-head h3{position:relative;font-size:24px;font-weight:900;line-height:1.08;letter-spacing:-.02em;margin:0;color:#081931;text-transform:uppercase}
.htsp-empty{position:relative;margin-top:12px;font-size:15px;color:#71809a}
.htsp-home-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.htsp-home-badge{color:#fff;background:#e0202b;border-radius:999px;padding:10px 16px;font-weight:900;font-size:13px;letter-spacing:.02em;box-shadow:0 6px 14px rgba(224,32,43,.22)}
.htsp-home-badge.is-campionato{background:#1450bb;box-shadow:0 6px 14px rgba(20,80,187,.22)}
.htsp-match-meta,.htsp-home-match-meta{position:relative;text-align:left;font-size:14px;color:#6c7a90;letter-spacing:.02em;margin:10px 0 22px;font-weight:700}
.htsp-home-match-meta{text-align:center;margin:58px auto 75px}
.htsp-match-row,.htsp-home-match-row{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px}
.htsp-home-team,.htsp-team-box{display:flex;flex:1;min-width:0;flex-direction:column;align-items:center;text-align:center;gap:14px;font-size:17px;line-height:1.25;color:#0a1a37}
.htsp-home-team strong,.htsp-team-box strong{font-weight:800;display:block}
.htsp-home-score,.htsp-home-vs,.htsp-score,.htsp-vs{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:118px;
  padding:10px 16px;
  border-radius:12px;
  background:#f4f7fb;
  border:1px solid #e3eaf3;
  font-size:42px;
  line-height:1.05;
  font-weight:900;
  color:#091b3a;
  white-space:nowrap;
  letter-spacing:-.04em;
}
.htsp-vs,.htsp-home-vs{color:#8d99ab;font-size:28px;letter-spacing:0}
.htsp-team-logo{object-fit:contain;max-width:100%;display:inline-block}
.htsp-match-card .htsp-team-logo{width:68px!important;height:68px!important}
.htsp-logo-fallback{display:inline-flex;align-items:center;justify-content:center;width:65px;height:65px;border-radius:50%;background:#f2f5fb;font-size:22px;font-weight:800;color:#124abc}
.htsp-home-calendar-link{display:flex;align-items:center;justify-content:center;gap:12px;margin:35px 0 0 auto;padding:12px 18px;width:max-content;border:1px solid #0c4dbe;border-radius:10px;color:#0645b2;text-decoration:none;font-weight:850}

/* SEZIONI */
.htsp-section{margin:26px 0;background:#fff;border:1px solid #dbe5f1;border-radius:16px;padding:18px 20px 14px;box-shadow:0 10px 28px rgba(10,26,55,.05)}
.htsp-section-title{border-bottom:2px solid #f2c100;margin-bottom:16px;padding-bottom:10px;display:flex;justify-content:space-between;align-items:end;gap:15px}
.htsp-section-title h3{font-size:22px;line-height:1.2;margin:0;color:#081931;letter-spacing:-.02em}
.htsp-section-title span{color:#66758d;font-size:13px;font-weight:700}
.htsp-scroll{overflow-x:auto}

/* TABELLA */
.htsp-table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px;min-width:760px}
.htsp-table th{background:#071b3a;color:#fff;padding:14px 14px;text-align:left;font-size:12px;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.htsp-table th:first-child{border-top-left-radius:8px}
.htsp-table th:last-child{border-top-right-radius:8px}
.htsp-table td{padding:13px 14px;border-bottom:1px solid #e6edf5;vertical-align:middle}
.htsp-table tbody tr:hover{background:#f8fbff}
.htsp-team-cell{display:flex;align-items:center;gap:14px}
.htsp-table .htsp-team-logo{width:34px;height:34px}
.htsp-highlight{background:#fff5c4;font-weight:700}
.htsp-highlight:hover{background:#ffefad!important}

/* CALENDARIO */
.htsp-fixtures h4{margin:22px 0 10px;background:#eff4fb;padding:11px 14px;border-radius:8px;font-size:14px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;color:#50617c}
.htsp-fixture{display:grid;grid-template-columns:110px 1fr 110px 1fr;gap:10px;align-items:center;border:1px solid #e6edf5;border-radius:10px;padding:12px 14px;margin-bottom:8px;background:#fff}
.htsp-fixture-me{background:#fff8db;border-color:#f1df95}
.htsp-fixture-date{color:#556377;font-size:12px;font-weight:700;line-height:1.35;text-transform:uppercase}
.htsp-fixture-date small{display:block;font-size:12px;color:#7d8ca2;text-transform:none}
.htsp-fixture-team{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:800;color:#081931}
.htsp-fixture-team.home{justify-content:flex-end;text-align:right}
.htsp-fixture-score{display:inline-flex;align-items:center;justify-content:center;justify-self:center;min-width:88px;padding:9px 12px;background:#f4f7fb;border:1px solid #e3eaf3;border-radius:10px;font-weight:900;text-align:center;font-size:20px;letter-spacing:-.03em}
.htsp-fixture .htsp-team-logo{width:30px;height:30px}
.htsp-info,.htsp-warning{border:1px solid #dce5f2;border-radius:10px;padding:18px 20px;margin:16px 0;background:#f8fbff;color:#51627c}

/* Home extra invariato ma coerente */
.htsp-home-scorers{margin-top:24px;border-top:1px solid #e6edf5;padding-top:14px}
.htsp-home-scorers-title{text-align:center;font-size:12px;font-weight:800;letter-spacing:1px}
.htsp-home-scorers-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:10px}
.htsp-home-scorer{font-size:13px;text-align:center}
.htsp-home-scorer-time{color:#6b7b90;margin-left:6px}

/* 3.11.13: homepage cards più orizzontali e compatte (solo home). */
.htsp-home-matches .htsp-home-match-grid{gap:24px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
.htsp-home-matches .htsp-home-match-card{box-sizing:border-box;min-height:300px!important;padding:22px 26px 18px!important;border-top-width:6px!important}
.htsp-home-matches .htsp-home-card-head{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:14px!important}
.htsp-home-matches .htsp-home-card-head h3{font-size:24px!important;line-height:1.1!important;font-weight:850!important;letter-spacing:-.4px!important;flex:1 1 auto;min-width:0;margin:0!important;text-transform:uppercase}
.htsp-home-matches .htsp-home-badge{box-sizing:border-box;flex:0 0 auto!important;border-radius:999px!important;padding:8px 14px!important;font-size:12px!important;font-weight:800!important;line-height:1.1!important;white-space:nowrap!important;text-align:center}
.htsp-home-matches .htsp-home-match-meta{margin:18px auto 22px!important;text-align:center!important;font-size:14px!important;font-weight:600!important;line-height:1.35!important}
.htsp-home-matches .htsp-home-match-row{display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;align-items:center!important;column-gap:16px!important}
.htsp-home-matches .htsp-home-team{min-width:0!important;font-size:16px!important;line-height:1.2!important;gap:10px!important;align-items:center!important;justify-content:center!important}
.htsp-home-matches .htsp-home-team strong{font-size:16px!important;line-height:1.2!important;font-weight:700!important;overflow-wrap:anywhere;word-break:normal}
.htsp-home-matches .htsp-home-team .htsp-team-logo{width:72px!important;height:72px!important;max-width:100%!important;object-fit:contain!important}
.htsp-home-matches .htsp-home-score,.htsp-home-matches .htsp-home-vs{font-size:42px!important;line-height:1!important;font-weight:900!important;letter-spacing:-1px!important;min-width:94px!important;padding:10px 14px!important}
.htsp-home-matches .htsp-home-calendar-link{font-size:14px!important;line-height:1.2!important;margin-top:22px!important;padding:10px 14px!important;white-space:nowrap}
.htsp-home-matches .htsp-home-scorers{margin-top:16px!important;padding-top:12px!important}
.htsp-home-matches .htsp-home-scorer{font-size:12px!important}

@media (max-width:1200px){
  .htsp-filters{grid-template-columns:repeat(2,minmax(180px,1fr));}
}
@media (max-width:1100px) and (min-width:851px){
  .htsp-home-matches .htsp-home-match-card{min-height:280px!important;padding:20px 18px!important}
  .htsp-home-matches .htsp-home-card-head h3{font-size:20px!important}
  .htsp-home-matches .htsp-home-badge{font-size:11px!important;padding:7px 10px!important}
  .htsp-home-matches .htsp-home-team strong{font-size:14px!important}
  .htsp-home-matches .htsp-home-score,.htsp-home-matches .htsp-home-vs{font-size:34px!important;min-width:74px!important;padding:8px 10px!important}
  .htsp-home-matches .htsp-home-team .htsp-team-logo{width:58px!important;height:58px!important}
}
@media(max-width:850px){
  .htsp-filters{grid-template-columns:1fr;padding:18px}
  .htsp-summary-grid,.htsp-home-match-grid{grid-template-columns:1fr;gap:16px}
  .htsp-match-card,.htsp-home-match-card{min-height:0;padding:20px 18px}
  .htsp-home-card-head h3,.htsp-card-kicker{font-size:22px}
  .htsp-home-match-meta,.htsp-match-meta{margin:14px 0 20px}
  .htsp-home-score,.htsp-home-vs,.htsp-score,.htsp-vs{min-width:72px;font-size:29px;padding:8px 10px}
  .htsp-home-team,.htsp-team-box{font-size:14px;gap:10px}
  .htsp-home-team .htsp-team-logo,.htsp-match-card .htsp-team-logo{width:56px!important;height:56px!important}
  .htsp-fixture{grid-template-columns:74px 1fr 72px 1fr;padding:10px;font-size:12px}
  .htsp-fixture .htsp-team-logo{width:24px;height:24px}
  .htsp-fixture-team{font-size:12px}
  .htsp-fixture-score{min-width:64px;font-size:16px}
  .htsp-section{padding:16px 14px 12px}
  .htsp-section-title{align-items:flex-start;flex-direction:column}
  .htsp-home-matches .htsp-home-match-grid{grid-template-columns:1fr!important;gap:16px!important}
  .htsp-home-matches .htsp-home-match-card{min-height:0!important;padding:22px 18px!important}
  .htsp-home-matches .htsp-home-card-head h3{font-size:22px!important}
  .htsp-home-matches .htsp-home-badge{font-size:11px!important;padding:8px 10px!important}
  .htsp-home-matches .htsp-home-match-meta{margin:32px auto 37px!important;font-size:14px!important}
  .htsp-home-matches .htsp-home-team{gap:10px!important}
  .htsp-home-matches .htsp-home-team strong{font-size:14px!important}
  .htsp-home-matches .htsp-home-team .htsp-team-logo{height:62px!important;width:62px!important}
  .htsp-home-matches .htsp-home-score,.htsp-home-matches .htsp-home-vs{font-size:37px!important}
  .htsp-home-matches .htsp-home-calendar-link{font-size:12px!important;margin-top:30px!important;white-space:normal}
}
