/**
 * ==========================================================
 * FHL - Formation Workspace
 * FORMATION.CSS
 * ==========================================================
 *
 * File:
 * includes/frontend/dashboard/modules/formation/assets/css/formation.css
 *
 * Layout:
 * - Header
 * - Player Selection
 * - Formation Field
 * - Bench Selection
 * - Next Match
 * - Formation Status
 * - Unavailable Players
 * - Deadline
 * - Actions
 *
 * Stato:
 * riferimento visuale / struttura Workspace
 */


/* ==========================================================
   RESET LOCALE
========================================================== */

.fh-formation-workspace,
.fh-formation-workspace * {
    box-sizing: border-box;
}


/* ==========================================================
   WORKSPACE
========================================================== */

.fh-formation-workspace {
    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 30px;

    background: #071019;
    color: #ffffff;
}


/* ==========================================================
   DEBUG / RIFERIMENTO VISUALE WIDGET
========================================================== */

.fh-formation-widget-reference {
    display: none !important;
}

.fh-formation-widget-reference__label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

.fh-formation-widget-reference__file {
    margin-top: 2px;

    color: #b9a15b;

    font-size: 8px;
    line-height: 1.2;
}


/* ==========================================================
   HEADER WORKSPACE
========================================================== */

.fh-formation-header {
    width: 100%;

    margin-bottom: 18px;
}


/* ==========================================================
   LAYOUT PRINCIPALE 3 COLONNE
========================================================== */

.fh-formation-layout {
    display: grid;

    grid-template-columns:
        minmax(290px, 0.95fr)
        minmax(500px, 1.9fr)
        minmax(290px, 0.9fr);

    gap: 18px;

    width: 100%;

    align-items: start;
}


/* ==========================================================
   COLONNA SINISTRA
========================================================== */

.fh-formation-sidebar-left {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.fh-formation-player-selection-wrapper {
    width: 100%;
    min-height: 100%;

    display: flex;
    flex-direction: column;
}

.fh-formation-player-selection-wrapper > * {
    width: 100%;
}


/* ==========================================================
   COLONNA CENTRALE
========================================================== */

.fh-formation-content {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fh-formation-field-wrapper {
    width: 100%;
}

.fh-formation-bench-wrapper {
    width: 100%;
}


/* ==========================================================
   COLONNA DESTRA
========================================================== */

.fh-formation-sidebar-right {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 12px;
}

.fh-formation-next-match-wrapper,
.fh-formation-status-wrapper,
.fh-formation-unavailable-wrapper,
.fh-formation-unavailable-stack,
.fh-formation-opponent-scout-wrapper,
.fh-formation-opponent-results-wrapper,
.fh-formation-deadline-wrapper {
    width: 100%;
}

.fh-formation-unavailable-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fh-formation-unavailable-stack .fhl-unavailable-widget {
    margin-top: 0;
}


/* ==========================================================
   EQUAL COLUMN HEIGHT
   Desktop 3-column. Height from the center column.
   ========================================================== */

.fh-formation-layout--balanced {
    height: var(--fh-formation-column-height);
    align-items: stretch;
    overflow: hidden;
}

.fh-formation-layout--balanced .fh-formation-sidebar-left,
.fh-formation-layout--balanced .fh-formation-sidebar-right,
.fh-formation-layout--balanced .fh-formation-content {
    min-width: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    align-self: stretch;
}

.fh-formation-layout--balanced .fh-formation-sidebar-left {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fh-formation-layout--balanced .fh-formation-content {
    overflow: hidden;
}

.fh-formation-layout--balanced .fh-formation-player-selection-wrapper{
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
}

.fh-formation-layout--balanced .fh-formation-player-selection{
    min-height:0;
    height:100%;
    overflow:hidden;
}

.fh-formation-layout--balanced .fh-formation-player-selection__groups{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
}

.fh-formation-layout--balanced .fh-formation-sidebar-right{
    overflow-x: hidden;
    overflow-y: auto;
}

.fh-formation-layout--balanced .fh-formation-sidebar-right::-webkit-scrollbar,
.fh-formation-layout--balanced .fh-formation-player-selection__groups::-webkit-scrollbar{
    width:8px;
}

.fh-formation-layout--balanced .fh-formation-sidebar-right::-webkit-scrollbar-thumb,
.fh-formation-layout--balanced .fh-formation-player-selection__groups::-webkit-scrollbar-thumb{
    background:rgba(247,198,0,.35);
    border-radius:999px;
}


/* ==========================================================
   ==========================================================
   PLAYER SELECTION
   ==========================================================
========================================================== */

.fh-formation-player-selection {
    width: 100%;
    min-height: 850px;

    display: flex;
    flex-direction: column;

    padding: 16px;

    border: 1px solid #263542;
    border-radius: 6px;

    background: #0b141d;
}


/* ==========================================================
   PLAYER SELECTION HEADER
========================================================== */

.fh-formation-player-selection__title {
    display: flex;
    align-items: flex-start;

    gap: 7px;

    margin-bottom: 15px;
}

.fh-formation-player-selection__title-index {
    color: #f0b400;

    font-size: 17px;
    font-weight: 700;
}

.fh-formation-player-selection__title h2 {
    margin: 0;

    color: #ffffff;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.fh-formation-player-selection__title p {
    margin: 4px 0 0;

    color: #aab4bc;

    font-size: 10px;
}


/* ==========================================================
   MODULO
========================================================== */

.fh-formation-player-selection__module-row {
    display: flex;
    align-items: flex-end;

    gap: 8px;

    margin-bottom: 14px;
}

.fh-formation-player-selection__module-select {
    flex: 1;
}

.fh-formation-player-selection__module-select label {
    display: block;

    margin-bottom: 5px;

    color: #9da8b0;

    font-size: 9px;
}

.fh-formation-player-selection__module-select select {
    width: 100%;
    height: 34px;

    padding: 0 9px;

    border: 1px solid #344450;
    border-radius: 4px;

    background: #081119;
    color: #ffffff;

    font-size: 10px;
}

.fh-formation-player-selection__module-help {
    height: 34px;

    border: 0;

    background: transparent;

    color: #4da7e8;

    font-size: 9px;
}


/* ==========================================================
   ROSA
========================================================== */

.fh-formation-player-selection__roster-header {
    margin-bottom: 7px;
}

.fh-formation-player-selection__roster-header h3 {
    margin: 0;

    color: #ffffff;

    font-size: 10px;
}


/* ==========================================================
   SEARCH
========================================================== */

.fh-formation-player-selection__search {
    margin-bottom: 8px;
}

.fh-formation-player-selection__search-box {
    display: flex;
    align-items: center;

    width: 100%;
    height: 34px;

    border: 1px solid #2c3b48;
    border-radius: 4px;

    background: #081119;
}

.fh-formation-player-selection__search-icon {
    padding-left: 8px;

    color: #7e8b94;
}

.fh-formation-player-selection__search-box input {
    flex: 1;

    width: 100%;
    height: 100%;

    padding: 0 7px;

    border: 0;
    outline: 0;

    background: transparent;
    color: #ffffff;

    font-size: 10px;
}

.fh-formation-player-selection__filter-button {
    width: 34px;
    height: 100%;

    border: 0;
    border-left: 1px solid #263542;

    background: transparent;
    color: #8c98a0;
}


/* ==========================================================
   ROLE TABS
========================================================== */

.fh-formation-player-selection__role-tabs {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    border-bottom: 1px solid #263542;
}

.fh-formation-player-role-tab {
    position: relative;

    height: 29px;

    border: 0;

    background: transparent;

    color: #8f9ba3;

    font-size: 8px;
}

.fh-formation-player-role-tab.is-active {
    color: #f0b400;
}

.fh-formation-player-role-tab.is-active::after {
    content: "";

    position: absolute;

    left: 10%;
    right: 10%;
    bottom: -1px;

    height: 2px;

    background: #f0b400;
}


/* ==========================================================
   PLAYER LIST
========================================================== */

.fh-formation-player-selection__list-header {
    display: grid;

    grid-template-columns:
        18px
        minmax(0, 1fr)
        30px
        28px
        30px;

    align-items: center;

    gap: 4px;

    min-height: 30px;

    border-bottom: 1px solid #263542;

    color: #7f8b94;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fh-formation-player-selection__list-header span:nth-child(3),
.fh-formation-player-selection__list-header span:nth-child(4),
.fh-formation-player-selection__list-header span:nth-child(5) {
    text-align: center;
}


.fh-formation-player-selection__list {
    width: 100%;

    max-height: none;

    overflow: visible;
}


/* ==========================================================
   PLAYER CARD LIST
========================================================== */

.fh-formation-player-card {
    display: grid;

    grid-template-columns:
        18px
        40px
        minmax(0, 1fr)
        30px
        28px
        30px;

    align-items: center;

    gap: 4px;

    min-height: 52px;

    border-bottom: 1px solid #1d2a34;
}


.fh-formation-player-card__index {
    color: #8f9ba3;

    font-size: 8px;
    font-weight: 700;

    text-align: center;
}

.fh-formation-player-card__avatar {
    flex: 0 0 40px;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #34434f;
    border-radius: 4px;

    background: #17222c;

    color: #ffffff;

    font-size: 10px;
}

.fh-formation-player-card__avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.fh-formation-player-card__avatar svg {
    width: 100%;
    height: 100%;

    display: block;
}

.fh-formation-player-card__identity {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.fh-formation-player-card__identity strong {
    overflow: hidden;

    color: #ffffff;

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.fh-formation-player-card__identity span {
    color: #89959e;

    font-size: 8px;
}


.fh-formation-player-card__role {
    min-width: 0;

    padding: 2px 1px;

    border: 1px solid #56636d;
    border-radius: 3px;

    color: #cbd2d7;

    font-size: 9px;
    font-weight: 700;

    text-align: center;
}

.fh-formation-player-card__role--por {
    border-color: #b58a00;
    color: #f0b400;
}

.fh-formation-player-card__role--dif {
    border-color: #2584d8;
    color: #4da7e8;
}

.fh-formation-player-card__role--cen {
    border-color: #b58a00;
    color: #f0b400;
}

.fh-formation-player-card__role--att {
    border-color: #d83232;
    color: #ff5555;
}

.fh-formation-player-card__value {
    min-width: 28px;

    padding: 2px 1px;

    border: 1px solid #a97900;
    border-radius: 3px;

    color: #f0b400;

    font-size: 8px;
    font-weight: 700;
}

.fh-formation-player-card__action {
    width: 30px;
    height: 30px;

    border: 0;
    border-radius: 50%;

    background: #bfc5ca;
    color: #071019;

    font-size: 18px;
    font-weight: 700;
}


/* ==========================================================
   PLAYER PROGRESS
========================================================== */

.fh-formation-player-selection__progress {
    margin-top: 16px;

    padding-top: 10px;
}

.fh-formation-player-selection__progress-header strong {
    color: #55c875;

    font-size: 9px;
}

.fh-formation-player-selection__progress-track {
    width: 100%;
    height: 4px;

    margin-top: 5px;

    border-radius: 4px;

    background: #1d2a34;
}

.fh-formation-player-selection__progress-value {
    height: 100%;

    border-radius: 4px;

    background: #2ca64a;
}


/* ==========================================================
   CAPITANO / VICE
========================================================== */

.fh-formation-player-selection__role-selector {
    display: grid;

    grid-template-columns: 95px minmax(0, 1fr);

    align-items: center;

    gap: 7px;

    margin-top: 8px;
}

.fh-formation-player-selection__role-label {
    display: flex;
    align-items: center;

    gap: 5px;
}

.fh-formation-player-selection__role-label span {
    color: #ffffff;

    font-size: 8px;
}

.fh-formation-player-selection__role-label strong {
    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 3px;

    background: #f0b400;
    color: #071019;

    font-size: 8px;
}

.fh-formation-player-selection__role-control select {
    width: 100%;
    height: 28px;

    border: 1px solid #2c3b48;
    border-radius: 4px;

    background: #081119;
    color: #ffffff;

    font-size: 8px;
}


/* ==========================================================
   ==========================================================
   FORMATION FIELD
   ==========================================================
========================================================== */

.fh-formation-field {
    width: 100%;
}


/* ==========================================================
   FIELD HEADER
========================================================== */

.fh-formation-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 9px;
}

.fh-formation-field__title {
    display: flex;
    align-items: flex-start;

    gap: 6px;
}

.fh-formation-field__title-index {
    color: #f0b400;

    font-size: 15px;
    font-weight: 700;
}

.fh-formation-field__title h2 {
    margin: 0;

    color: #ffffff;

    font-size: 14px;
    font-weight: 700;
}

.fh-formation-field__title span {
    display: block;

    margin-top: 3px;

    color: #aeb8bf;

    font-size: 9px;
}


/* ==========================================================
   VALIDITY
========================================================== */

.fh-formation-field__validity {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    padding: 5px 7px;

    border: 1px solid #245c36;
    border-radius: 4px;

    color: #59d477;

    font-size: 8px;
}

.fh-formation-field__validity.is-pending {
    border-color: #755d13;

    color: #f0b400;
}

.fh-formation-field__validity-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: currentColor;
    color: #071019;

    font-size: 7px;
    font-weight: 800;
}


/* ==========================================================
   PITCH / STADIO
========================================================== */

.fh-formation-pitch {
    position: relative;

    width: 100%;
    height: auto;

    border: 1px solid #346443;
    border-radius: 3px;

    overflow: hidden;

    background: #071019;
}


/* ==========================================================
   IMMAGINE STADIO
========================================================== */

.fh-formation-stadium-image {
    display: block;

    width: 100%;
    height: auto;

    margin: 0;
    padding: 0;

    object-fit: contain;
}


/* ==========================================================
   PITCH LINES
========================================================== */

.fh-formation-pitch__halfway-line {
    position: absolute;

    top: 50%;
    left: 0;

    width: 100%;
    height: 1px;

    background: rgba(255,255,255,.55);
}

.fh-formation-pitch__center-circle {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 75px;
    height: 75px;

    border: 1px solid rgba(255,255,255,.55);
    border-radius: 50%;

    transform: translate(-50%, -50%);
}

.fh-formation-pitch__center-dot {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #ffffff;

    transform: translate(-50%, -50%);
}


/* ==========================================================
   PENALTY AREAS
========================================================== */

.fh-formation-pitch__penalty-area {
    position: absolute;

    left: 50%;

    width: 42%;
    height: 17%;

    border: 1px solid rgba(255,255,255,.55);

    transform: translateX(-50%);
}

.fh-formation-pitch__penalty-area--top {
    top: 0;

    border-top: 0;
}

.fh-formation-pitch__penalty-area--bottom {
    bottom: 0;

    border-bottom: 0;
}

.fh-formation-pitch__goal {
    position: absolute;

    left: 50%;

    width: 24%;
    height: 12px;

    border: 1px solid rgba(255,255,255,.6);

    transform: translateX(-50%);
}

.fh-formation-pitch__penalty-area--top .fh-formation-pitch__goal {
    top: 0;

    border-top: 0;
}

.fh-formation-pitch__penalty-area--bottom .fh-formation-pitch__goal {
    bottom: 0;

    border-bottom: 0;
}


/* ==========================================================
   PLAYER CONTAINER
========================================================== */

.fh-formation-pitch__players {
    position: absolute;

    inset: 0;

    z-index: 5;

    pointer-events: none;
}


/* ==========================================================
   PLAYER SLOTS
========================================================== */

.fh-formation-player-slot {
    position: absolute;

    width: 70px;
    height: 78px;

    transform: translate(-50%, -50%);

    pointer-events: auto;
}


/* ==========================================================
   4-3-3 ATTACCO
========================================================== */

.fh-formation-player-slot--attacker-left {
    top: 15%;
    left: 22%;
}

.fh-formation-player-slot--attacker-center {
    top: 9%;
    left: 50%;
}

.fh-formation-player-slot--attacker-right {
    top: 15%;
    left: 78%;
}


/* ==========================================================
   4-3-3 CENTROCAMPO
========================================================== */

.fh-formation-player-slot--midfielder-left {
    top: 35%;
    left: 25%;
}

.fh-formation-player-slot--midfielder-center {
    top: 31%;
    left: 50%;
}

.fh-formation-player-slot--midfielder-right {
    top: 35%;
    left: 75%;
}


/* ==========================================================
   4-3-3 DIFESA
========================================================== */

.fh-formation-player-slot--defender-left {
    top: 61%;
    left: 13%;
}

.fh-formation-player-slot--defender-center-left {
    top: 59%;
    left: 38%;
}

.fh-formation-player-slot--defender-center-right {
    top: 59%;
    left: 62%;
}

.fh-formation-player-slot--defender-right {
    top: 61%;
    left: 87%;
}


/* ==========================================================
   4-3-3 PORTIERE
========================================================== */

.fh-formation-player-slot--goalkeeper {
    top: 84%;
    left: 50%;
}


/* ==========================================================
   EMPTY PLAYER SLOT
========================================================== */

.fh-formation-player-slot__empty {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px dashed rgba(255,255,255,.45);
    border-radius: 5px;

    background: rgba(0,0,0,.15);

    color: rgba(255,255,255,.8);
}

.fh-formation-player-slot__empty-icon {
    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;

    font-size: 14px;
}

.fh-formation-player-slot__empty-label {
    margin-top: 3px;

    font-size: 7px;
}


/* ==========================================================
   PLAYER CARD ON PITCH
========================================================== */

.fh-formation-field-player-card {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 4px;

    border: 1px solid #c99300;
    border-radius: 5px;

background: transparent;

    box-shadow:
        0 3px 8px rgba(0,0,0,.35);
}

.fh-formation-field-player-card__rating {
    position: absolute;

    top: 4px;
    left: 5px;

    color: #f0b400;

    font-size: 9px;
    font-weight: 800;
}

.fh-formation-field-player-card__avatar {
    width: 40px;
    height: 40px;

    margin-top: 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border-radius: 3px;

    background: transparent;

    color: #ffffff;

    font-size: 11px;
}

.fh-formation-field-player-card__avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.fh-formation-field-player-card__role {
    align-self: flex-start;

    color: #f0b400;

    font-size: 7px;
    font-weight: 700;
}

.fh-formation-field-player-card__name {
    width: 100%;

    overflow: hidden;

    color: #ffffff;

    font-size: 7px;
    font-weight: 600;

    text-align: center;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ==========================================================
   AUTOMATIC SUBSTITUTIONS
========================================================== */

.fh-formation-pitch__automatic-substitutions {
    position: absolute;

    left: 10px;
    bottom: 10px;

    z-index: 10;

    width: 190px;
    min-height: 45px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 7px 9px;

    border: 1px solid #263542;
    border-radius: 5px;

    background: rgba(7,16,25,.92);
}

.fh-formation-pitch__automatic-substitutions > div {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fh-formation-pitch__automatic-substitutions-title {
    color: #ffffff;

    font-size: 7px;
    font-weight: 700;
}

.fh-formation-pitch__automatic-substitutions-state {
    color: #55c875;

    font-size: 7px;
}


/* ==========================================================
   TOGGLE
========================================================== */

.fh-formation-toggle {
    position: relative;

    width: 31px;
    height: 16px;

    padding: 0;

    border: 1px solid #53616c;
    border-radius: 20px;

    background: #263542;
}

.fh-formation-toggle.is-active {
    border-color: #3eaa5a;

    background: #258943;
}

.fh-formation-toggle__handle {
    position: absolute;

    top: 2px;
    left: 2px;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    background: #ffffff;
}

.fh-formation-toggle.is-active .fh-formation-toggle__handle {
    left: 17px;
}


/* ==========================================================
   CAMBIA MODULO
========================================================== */

.fh-formation-change-module {
    position: absolute;

    right: 10px;
    bottom: 10px;

    z-index: 10;

    height: 34px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 0 10px;

    border: 1px solid #354553;
    border-radius: 4px;

    background: rgba(7,16,25,.92);

    color: #ffffff;

    font-size: 8px;
    font-weight: 600;
}


/* ==========================================================
   FIELD DEBUG
========================================================== */

.fh-formation-pitch__debug {
    position: absolute;

    top: 7px;
    left: 7px;

    z-index: 20;

    padding: 3px 5px;

    border: 1px solid #f0b400;

    background: rgba(0,0,0,.65);

    color: #f0b400;

    font-size: 7px;
}


/* ==========================================================
   FIELD FOOTER
========================================================== */

.fh-formation-field__footer {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 7px;

    margin-top: 7px;
}

.fh-formation-field__footer-item {
    display: flex;
    flex-direction: column;

    gap: 2px;

    padding: 5px 7px;

    border-left: 2px solid #263542;
}

.fh-formation-field__footer-item span {
    color: #82909a;

    font-size: 7px;
}

.fh-formation-field__footer-item strong {
    color: #ffffff;

    font-size: 8px;
}

.fh-formation-field__footer-item strong.is-valid {
    color: #55c875;
}

.fh-formation-field__footer-item strong.is-pending {
    color: #f0b400;
}


/* ==========================================================
   ==========================================================
   BENCH SELECTION
   ==========================================================
========================================================== */

.fh-formation-bench-selection {
    width: 100%;

    padding: 13px;

    border: 1px solid #263542;
    border-radius: 5px;

    background: #0b141d;
}


/* ==========================================================
   BENCH HEADER
   ========================================================== */

.fh-formation-bench-selection__header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    margin-bottom: 9px;
}

.fh-formation-bench-selection__header::before {
    content: "COMPOSIZIONE PANCHINA";

    display: block;

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.fh-formation-bench-selection__counter {
    flex: 0 0 auto;

    margin-left: auto;

    color: #ffffff;
    font-size: 12px;
}

.fh-formation-bench-selection__counter strong {
    color: #55c875;

    font-size: 13px;
}


/* ==========================================================
   BENCH LIST
   14 SLOT — 2 RIGHE DA 7
   ========================================================== */

.fh-formation-bench-selection__list {
    display: grid;

    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(98px, auto));

    align-items: stretch;

    gap: 7px;

    width: 100%;

    min-height: 203px;
}


/* ==========================================================
   BENCH PLAYER CARD
   ========================================================== */

.fh-formation-bench-player {
    position: relative;

    min-width: 0;
    min-height: 98px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 7px 5px 5px;

    border: 1px solid #9f7400;
    border-radius: 5px;

    background:
        linear-gradient(
            180deg,
            #17232d 0%,
            #0f1820 100%
        );

    overflow: hidden;
}


/* ==========================================================
   PRIORITÀ / NUMERO SLOT
   ========================================================== */

.fh-formation-bench-player__priority {
    position: absolute;

    top: 0;
    left: 0;

    width: 22px;
    height: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f0b400;
    color: #071019;

    font-size: 9px;
    font-weight: 800;

    border-bottom-right-radius: 4px;
}


/* ==========================================================
   AVATAR PANCHINA
   ========================================================== */

.fh-formation-bench-player__avatar {
    width: 43px;
    height: 43px;

    margin-top: 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #364652;
    border-radius: 4px;

    background: #1b2832;

    color: #ffffff;

    font-size: 12px;
    font-weight: 700;
}

.fh-formation-bench-player__avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.fh-formation-bench-player__avatar svg {
    width: 100%;
    height: 100%;
    display: block;
}


/* ==========================================================
   RUOLO PANCHINA
   ========================================================== */

.fh-formation-bench-player__role {
    align-self: flex-start;

    margin-top: 2px;
    margin-left: 4px;

    color: #f0b400;

    font-size: 7px;
    font-weight: 700;
}


/* ==========================================================
   NOME PANCHINA
   ========================================================== */

.fh-formation-bench-player__name {
    width: 100%;

    margin-top: 1px;

    overflow: hidden;

    color: #ffffff;

    font-size: 8px;
    font-weight: 600;

    text-align: center;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ==========================================================
   VALORE PANCHINA
   ========================================================== */

.fh-formation-bench-player__value {
    margin-top: 2px;

    color: #f0b400;

    font-size: 8px;
    font-weight: 700;
}


/* ==========================================================
   DRAG HANDLE
   ========================================================== */

.fh-formation-bench-player__drag {
    position: absolute;

    right: 4px;
    top: 4px;

    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #71808a;

    font-size: 10px;

    cursor: grab;
}

.fh-formation-bench-player__drag:hover {
    color: #ffffff;
}


/* ==========================================================
   SLOT PANCHINA VUOTO
   ========================================================== */

.fh-formation-bench-player--placeholder {
    justify-content: center;

    padding: 7px 5px;

    border-style: solid;
}

.fh-formation-bench-player__placeholder-icon {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 4px;

    border: 1px solid #56636d;
    border-radius: 50%;

    color: #ffffff;

    font-size: 16px;
    font-weight: 400;
}

.fh-formation-bench-player__placeholder-label {
    margin-top: 5px;

    color: #7f8b94;

    font-size: 7px;
    font-weight: 700;

    text-transform: uppercase;
}


/* ==========================================================
   SLOT +9
   Non più utilizzato: la panchina dispone di 14 slot fissi.
   ========================================================== */

.fh-formation-bench-more {
    display: none !important;
}


/* ==========================================================
   DRAG INFORMATION
   ========================================================== */

.fh-formation-bench-selection__drag-info {
    display: none !important;
}


/* ==========================================================
   BENCH FOOTER
   ========================================================== */

.fh-formation-bench-selection__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 6px;
}

.fh-formation-bench-selection__footer-status {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.fh-formation-bench-selection__footer-status span {
    color: #82909a;

    font-size: 7px;
}

.fh-formation-bench-selection__footer-status strong {
    color: #ffffff;

    font-size: 8px;
}

/* Nasconde esclusivamente il blocco ORDINE / PRIORITÀ. */
.fh-formation-bench-selection__footer-status:nth-child(2) {
    display: none !important;
}


/* ==========================================================
   BENCH EMPTY
   ========================================================== */

.fh-formation-bench-selection__empty {
    width: 100%;
    min-height: 85px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    border: 1px dashed #34424f;

    background: #0a1219;

    text-align: center;
}

.fh-formation-bench-selection__empty strong {
    color: #ffffff;

    font-size: 9px;
}

.fh-formation-bench-selection__empty span {
    color: #aab4bc;

    font-size: 8px;
}

.fh-formation-bench-selection__empty small {
    color: #687681;

    font-size: 7px;
}

/* ==========================================================
   ==========================================================
   SIDEBAR WIDGETS
   ==========================================================
========================================================== */

.fh-formation-next-match,
.fh-formation-status,
.fh-formation-unavailable,
.fh-formation-opponent-scout,
.fh-formation-opponent-results,
.fh-formation-deadline {
    width: 100%;

    padding: 16px 14px 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;

    background: #111820;

    overflow: hidden;
    box-sizing: border-box;
}

/* ==========================================================
   NEXT MATCH — WIDGET DEFINITIVO
   ========================================================== */

.fh-formation-next-match {
    display: flex;
    flex-direction: column;

    align-items: center;

    text-align: center;
}


/* ----------------------------------------------------------
   TITOLO
   ---------------------------------------------------------- */

.fh-formation-next-match__header {
    width: 100%;

    margin: 0 0 12px;

    color: #F7C600;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}


/* ----------------------------------------------------------
   DATA
   ---------------------------------------------------------- */

.fh-formation-next-match__date {
    width: 100%;

    margin-bottom: 5px;

    color: #ffffff;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;
}


/* ----------------------------------------------------------
   ORA
   ---------------------------------------------------------- */

.fh-formation-next-match__time {
    width: 100%;

    margin-bottom: 5px;

    color: #ffffff;

    font-size: 11px;
    line-height: 1.2;
}

.fh-formation-next-match__stadium {
    width: 100%;

    margin-bottom: 5px;

    color: #aab4bc;

    font-size: 11px;
    line-height: 1.3;
}


/* ----------------------------------------------------------
   GIORNATA
   ---------------------------------------------------------- */

.fh-formation-next-match__matchday {
    width: 100%;

    margin-bottom: 18px;

    color: #aab4bc;

    font-size: 10px;
    line-height: 1.2;
}


/* ----------------------------------------------------------
   SQUADRE
   ---------------------------------------------------------- */

.fh-formation-next-match__teams {
    width: 100%;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    column-gap: 10px;
}


/* ----------------------------------------------------------
   SINGOLA SQUADRA
   ---------------------------------------------------------- */

.fh-formation-next-match__team {
    min-width: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: flex-start;
}


/* ----------------------------------------------------------
   LOGO
   ---------------------------------------------------------- */

.fh-formation-next-match__logo {
    display: block;

    width: 52px;
    height: 52px;

    margin: 0 0 7px;

    object-fit: contain;
}


/* ----------------------------------------------------------
   NOME SQUADRA
   ---------------------------------------------------------- */

.fh-formation-next-match__team strong {
    display: block;

    width: 100%;

    overflow: hidden;

    color: #F7C600;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;

    text-align: center;

    white-space: normal;
}


/* ----------------------------------------------------------
   VS
   ---------------------------------------------------------- */

.fh-formation-next-match__versus {
    display: flex;

    align-items: center;
    justify-content: center;

    color: #F7C600;

    font-size: 16px;
    line-height: 1;
    font-weight: 800;
}


/* ==========================================================
   NEXT MATCH — RESPONSIVE
   ========================================================== */

@media (max-width: 500px) {

    .fh-formation-next-match {
        padding: 12px;
    }

    .fh-formation-next-match__header {
        font-size: 15px;
    }

    .fh-formation-next-match__date {
        font-size: 11px;
    }

    .fh-formation-next-match__time {
        font-size: 10px;
    }

    .fh-formation-next-match__matchday {
        margin-bottom: 15px;

        font-size: 9px;
    }

    .fh-formation-next-match__teams {
        column-gap: 7px;
    }

    .fh-formation-next-match__logo {
        width: 46px;
        height: 46px;

        margin-bottom: 6px;
    }

    .fh-formation-next-match__team strong {
        font-size: 10px;
    }

    .fh-formation-next-match__versus {
        font-size: 14px;
    }

}


/* ==========================================================
   OPPONENT SCOUT
   ========================================================== */

.fh-formation-opponent-scout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fh-formation-opponent-scout__header h3 {
    margin: 0 0 8px;

    color: #F7C600;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
}

.fh-formation-opponent-scout__team {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fh-formation-opponent-scout__team img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.fh-formation-opponent-scout__team strong {
    min-width: 0;

    overflow: hidden;

    color: #ffffff;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-formation-opponent-scout__empty {
    margin: 0;

    color: #aab4bc;

    font-size: 11px;
    line-height: 1.3;
}

.fh-formation-opponent-scout__table {
    width: 100%;
}

.fh-formation-opponent-scout__head,
.fh-formation-opponent-scout__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px 28px 30px 28px;
    gap: 4px;
    align-items: center;
}

.fh-formation-opponent-scout__head {
    padding-bottom: 6px;
    margin-bottom: 4px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    color: #8b9aab;

    font-size: 8px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fh-formation-opponent-scout__row {
    padding: 4px 0;

    border-bottom: 1px solid rgba(255, 255, 255, 0.04);

    color: #e8eef5;

    font-size: 11px;
    line-height: 1.2;
}

.fh-formation-opponent-scout__row:last-child {
    border-bottom: 0;
}

.fh-formation-opponent-scout__head .col-stat,
.fh-formation-opponent-scout__row .col-stat {
    text-align: center;
}

.fh-formation-opponent-scout__row .col-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.fh-formation-opponent-scout__avatar {
    width: 18px;
    height: 24px;
    flex: 0 0 18px;
    overflow: hidden;
}

.fh-formation-opponent-scout__avatar svg,
.fh-formation-opponent-scout__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fh-formation-opponent-scout__name {
    min-width: 0;

    overflow: hidden;

    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-formation-opponent-scout__unavailable {
    margin-top: 4px;
    padding-top: 10px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fh-formation-opponent-scout__unavailable h4 {
    margin: 0 0 8px;

    color: #F7C600;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.fh-formation-opponent-scout__unavailable > p {
    margin: 0;

    color: #aab4bc;

    font-size: 11px;
    line-height: 1.3;
}

.fh-formation-opponent-scout__unavailable-row {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 5px 0;
}

.fh-formation-opponent-scout__unavailable-identity {
    min-width: 0;
    flex: 1 1 auto;
}

.fh-formation-opponent-scout__unavailable-identity strong {
    display: block;

    overflow: hidden;

    color: #ffffff;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.fh-formation-opponent-scout__unavailable-identity span {
    display: block;

    color: #aab4bc;

    font-size: 10px;
    line-height: 1.2;
}

.fh-formation-opponent-scout__unavailable-remaining {
    flex: 0 0 auto;

    color: #F7C600;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 500px) {

    .fh-formation-opponent-scout {
        padding: 12px;
    }

    .fh-formation-opponent-scout__header h3 {
        font-size: 15px;
    }

}


/* ==========================================================
   OPPONENT RESULTS
   ========================================================== */

.fh-formation-opponent-results h3 {
    margin: 0 0 12px;

    color: #F7C600;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    text-align: center;
}

.fh-formation-opponent-results__empty {
    margin: 0;

    color: #aab4bc;

    font-size: 11px;
    line-height: 1.3;
    text-align: center;
}


/* ==========================================================
   ==========================================================
   ACTIONS
   ==========================================================
========================================================== */

.fh-formation-actions {
    width: 100%;

    margin-top: 16px;
}

.fh-formation-actions-widget {
    width: 100%;
}

.fh-formation-actions-widget__bar {
    display: grid;

    grid-template-columns:
        minmax(180px, .8fr)
        minmax(260px, 1fr)
        minmax(350px, 1.5fr);

    gap: 12px;

    width: 100%;
}

.fh-formation-action {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 14px;

    border: 1px solid #263542;
    border-radius: 5px;

    background: #0c151e;

    color: #ffffff;

    font-size: 9px;
}

.fh-formation-action--quick {
    justify-content: space-between;

    border-color: #8a6500;
}

.fh-formation-action--save {
    border-color: #263542;
}

.fh-formation-action--confirm {
    border-color: #e5a900;

    background: #e5a900;

    color: #071019;
}


/* ==========================================================
   RESPONSIVE 1250
========================================================== */

@media (max-width: 1250px) {

    .fh-formation-layout {
        grid-template-columns:
            minmax(250px, .8fr)
            minmax(430px, 1.5fr)
            minmax(250px, .8fr);
    }

   

    .fh-formation-player-slot {
        width: 64px;
        height: 72px;
    }

}


/* ==========================================================
   RESPONSIVE 1000
========================================================== */

@media (max-width: 1000px) {

    .fh-formation-layout {
        grid-template-columns: 1fr;
    }

    .fh-formation-player-selection {
        min-height: auto;
    }

    .fh-formation-sidebar-right {
        display: grid;

        grid-template-columns: repeat(2, 1fr);

        gap: 15px;
    }

    .fh-formation-actions-widget__bar {
        grid-template-columns: 1fr 1fr;
    }

}


/* ==========================================================
   RESPONSIVE 700
========================================================== */

@media (max-width: 700px) {

    .fh-formation-workspace {
        padding: 15px;
    }

    .fh-formation-sidebar-right {
        grid-template-columns: 1fr;
    }

    .fh-formation-bench-selection {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fh-formation-bench-selection__list {
        grid-template-columns: repeat(7, 92px);
        grid-template-rows: repeat(2, 98px);

        width: max-content;
        min-width: 100%;

        overflow: visible;
    }

    .fh-formation-bench-player {
        width: 92px;
    }

    .fh-formation-actions-widget__bar {
        grid-template-columns: 1fr;
    }

}


/* ==========================================================
   RESPONSIVE 500
========================================================== */

@media (max-width: 500px) {

    .fh-formation-workspace {
        padding: 10px;
    }

    

    .fh-formation-player-slot {
        width: 55px;
        height: 64px;
    }

    .fh-formation-field-player-card__avatar {
        width: 34px;
        height: 34px;
    }

    .fh-formation-pitch__automatic-substitutions {
        width: 165px;
    }

    .fh-formation-change-module {
        padding: 0 7px;
    }

}

/* ==========================================================
   RUNTIME HEADER — WIDGET COMPOSITO
========================================================== */

.fh-formation-runtime-header {
    width: 100%;
    min-height: 132px;

    display: grid;
    grid-template-columns: minmax(280px, 34%) minmax(0, 66%);

    background: #111a22;
    border: 1px solid #273540;
    border-radius: 6px;

    overflow: hidden;
}


/* ==========================================================
   IDENTITÀ SQUADRA
========================================================== */

.fh-formation-runtime-header__team {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 16px;

    padding: 16px 20px;

    background: #15191d;
    border-right: 1px solid #273540;
}

.fh-formation-runtime-header__team-logo {
    flex: 0 0 72px;

    width: 72px;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.fh-formation-runtime-header__team-logo img {
    display: block;

    width: 72px;
    height: 72px;

    object-fit: contain;
}

.fh-formation-runtime-header__team-content {
    min-width: 0;
}

.fh-formation-runtime-header__team-name {
    margin: 0 0 8px;

    color: #f3b400;

    font-size: 20px;
    line-height: 1.1;
    font-weight: 700;
}

.fh-formation-runtime-header__team-detail {
    min-height: 21px;

    display: grid;
    grid-template-columns: 16px auto minmax(0, 1fr);
    align-items: center;

    column-gap: 6px;

    color: #b9c2c9;

    font-size: 11px;
    line-height: 1.2;
}

.fh-formation-runtime-header__team-detail-icon {
    color: #f3b400;

    font-size: 9px;

    text-align: center;
}

.fh-formation-runtime-header__team-detail-label {
    color: #9ca7ae;
}

.fh-formation-runtime-header__team-detail strong {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #f2f4f5;

    font-weight: 600;
}


/* ==========================================================
   COMPETIZIONE
========================================================== */

.fh-formation-runtime-header__competition {
    min-width: 0;

    display: flex;
    flex-direction: column;

    padding: 14px 18px 12px;
}

.fh-formation-runtime-header__competition-main {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 58px;
}

.fh-formation-runtime-header__competition-logo {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.fh-formation-runtime-header__competition-logo img {
    display: block;

    width: 48px;
    height: 48px;

    max-width: 48px;
    max-height: 48px;

    object-fit: contain;
}

.fh-formation-runtime-header__competition-title {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.fh-formation-runtime-header__competition-title span {
    color: #89959d;

    font-size: 8px;
    line-height: 1;

    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.fh-formation-runtime-header__competition-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #f3b400;

    font-size: 18px;
    line-height: 1.1;

    font-weight: 700;
}


/* ==========================================================
   DATI COMPETIZIONE
========================================================== */

.fh-formation-runtime-header__competition-stats {
    width: 100%;

    display: grid;
    grid-template-columns:
        minmax(58px, 1fr)
        minmax(75px, 1.15fr)
        minmax(58px, 1fr)
        minmax(62px, .9fr)
        minmax(48px, .7fr)
        minmax(48px, .7fr)
        minmax(70px, 1fr)
        minmax(58px, .9fr);

    gap: 8px;

    margin-top: 8px;
    padding-top: 9px;

    border-top: 1px solid #3a454d;
}

.fh-formation-runtime-header__stat {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.fh-formation-runtime-header__stat span {
    color: #f3b400;

    font-size: 7px;
    line-height: 1;

    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fh-formation-runtime-header__stat strong {
    min-width: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #f1f3f4;

    font-size: 9px;
    line-height: 1.15;

    font-weight: 600;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1100px) {

    .fh-formation-runtime-header {
        grid-template-columns: minmax(230px, 32%) minmax(0, 68%);
    }

    .fh-formation-runtime-header__team {
        padding: 14px;
        gap: 12px;
    }

    .fh-formation-runtime-header__team-logo {
        flex-basis: 60px;

        width: 60px;
        height: 60px;
    }

    .fh-formation-runtime-header__team-logo img {
        width: 60px;
        height: 60px;
    }

    .fh-formation-runtime-header__competition-stats {
        gap: 5px;
    }
}


@media (max-width: 850px) {

    .fh-formation-runtime-header {
        grid-template-columns: 1fr;
    }

    .fh-formation-runtime-header__team {
        border-right: 0;
        border-bottom: 1px solid #273540;
    }

    .fh-formation-runtime-header__competition-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media (max-width: 520px) {

    .fh-formation-runtime-header__competition-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================================
   PLAYER SELECTION — NUOVA STRUTTURA MODULO + RUOLI
   STEP GRAFICO
========================================================== */

/*
 * Il nuovo widget non utilizza più:
 * - ricerca;
 * - tab TUTTI/POR/DIF/CEN/ATT;
 * - intestazione tabellare unica.
 *
 * Il layout diventa:
 * MODULO
 * SELEZIONE TITOLARI
 * PORTIERI
 * DIFENSORI
 * CENTROCAMPISTI
 * ATTACCANTI
 * PROGRESSO
 * CAPITANO / VICE CAPITANO
 */


/* ==========================================================
   ORDINE VISIVO DEL WIDGET
========================================================== */

.fh-formation-player-selection {
    display: flex;
    flex-direction: column;
}

.fh-formation-player-selection__roster-header {
    display: none;
}

.fh-formation-player-selection__module-selector {
    order: 1;

    width: 100%;

    margin-bottom: 14px;
}

.fh-formation-player-selection__title {
    order: 2;
}

.fh-formation-player-selection__groups {
    order: 3;
}

.fh-formation-player-selection__progress {
    order: 4;
}

.fh-formation-player-selection__role-selector {
    order: 5;
}


/* ==========================================================
   SELETTORE MODULO
========================================================== */

.fh-formation-player-selection__module-selector label {
    display: block;

    margin-bottom: 6px;

    color: #f0b400;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;

    text-transform: uppercase;
}

.fh-formation-player-selection__module-selector select {
    display: block;

    width: 100%;
    height: 34px;

    margin: 0;
    padding: 0 10px;

    border: 1px solid #344450;
    border-radius: 4px;

    outline: none;

    background: #081119;
    color: #ffffff;

    font-size: 10px;
    line-height: 34px;
}

.fh-formation-player-selection__module-selector select:focus {
    border-color: #f0b400;
}


/* ==========================================================
   GRUPPI ROSA
========================================================== */

.fh-formation-player-selection__groups {
    width: 100%;
}

.fh-formation-player-selection__group {
    width: 100%;

    margin: 0 0 14px;
    padding: 0;

    border: 0;
}

.fh-formation-player-selection__group:last-child {
    margin-bottom: 0;
}

.fh-formation-player-selection__group-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-height: 30px;

    margin: 0;

    padding: 0 2px 6px;

    border-bottom: 1px solid #263542;

    gap: 6px;
}

.fh-formation-player-selection__group-header span {
    order: 1;

    margin: 0;

    color: #f0b400;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
}

.fh-formation-player-selection__group-header h4 {
    order: 2;

    margin: 0;

    color: #f0b400;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;

    text-transform: uppercase;
}


/* ==========================================================
   LISTA DI OGNI RUOLO
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-selection__list {
    width: 100%;

    max-height: none;

    overflow: visible;
}


/* ==========================================================
   CARD GIOCATORE
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card {
    display: grid;

    grid-template-columns:
        40px
        minmax(0, 1fr)
        36px
        30px
        30px;

    align-items: center;

    gap: 6px;

    width: 100%;
    min-height: 52px;

    padding: 5px 0;

    border-bottom: 1px solid #1d2a34;
}

.fh-formation-player-selection__group
.fh-formation-player-card:last-child {
    border-bottom: 0;
}


/* ==========================================================
   AVATAR
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__avatar {
    width: 40px;
    height: 40px;

    flex: 0 0 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid #34434f;
    border-radius: 4px;

    background: #17222c;
}

.fh-formation-player-selection__group
.fh-formation-player-card__avatar img,
.fh-formation-player-selection__group
.fh-formation-player-card__avatar svg {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ==========================================================
   NOME
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__identity {
    min-width: 0;

    display: block;
}

.fh-formation-player-selection__group
.fh-formation-player-card__identity strong {
    display: block;

    min-width: 0;

    overflow: hidden;

    color: #ffffff;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

/*
 * Il ruolo viene già visualizzato nella colonna dedicata.
 * Evitiamo quindi la seconda visualizzazione dentro identity.
 */
.fh-formation-player-selection__group
.fh-formation-player-card__identity span {
    display: none;
}


/* ==========================================================
   COLONNA RUOLO
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__role {
    width: 36px;
    min-width: 36px;

    padding: 4px 2px;

    border-radius: 3px;

    font-size: 8px;
    line-height: 1;
    font-weight: 700;

    text-align: center;
}


/* ==========================================================
   COLONNA VALORE
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__value {
    width: 30px;
    min-width: 30px;

    padding: 4px 2px;

    border: 1px solid #a97900;
    border-radius: 3px;

    color: #f0b400;

    font-size: 8px;
    line-height: 1;
    font-weight: 700;

    text-align: center;
}


/* ==========================================================
   PULSANTE +
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__action {
    width: 30px;
    height: 30px;

    min-width: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #bfc5ca;
    color: #071019;

    font-size: 18px;
    line-height: 1;
    font-weight: 700;

    cursor: pointer;
}

.fh-formation-player-selection__group
.fh-formation-player-card__action:hover {
    background: #d2d7db;
}


/* ==========================================================
   PULSANTE + — GIOCATORE IN PANCHINA
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__action.is-bench {
    background: #f0b400 !important;
    color: #07111c !important;
    cursor: default !important;
    opacity: 1 !important;
}

.fh-formation-player-selection__group
.fh-formation-player-card__action.is-bench:disabled {
    background: #f0b400 !important;
    color: #07111c !important;
    cursor: default !important;
    opacity: 1 !important;
}

.fh-formation-player-card.is-unavailable {
    opacity: 0.55;
}

.fh-formation-player-selection__group
.fh-formation-player-card__action.is-unavailable,
.fh-formation-player-selection__group
.fh-formation-player-card__action[data-state="unavailable"],
.fh-formation-player-selection__group
.fh-formation-player-card__action.is-unavailable:disabled {
    background: #5a2a2a !important;
    color: #f2b8b8 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}



/* ==========================================================
   PULSANTE + — GIOCATORE TITOLARE
========================================================== */

.fh-formation-player-selection__group
.fh-formation-player-card__action[data-state="starter"] {
    background: #21863c !important;
    color: #ffffff !important;
    cursor: default;
    opacity: 1;
}

.fh-formation-player-selection__group
.fh-formation-player-card__action[data-state="starter"]:disabled {
    background: #21863c !important;
    color: #ffffff !important;
    cursor: default;
    opacity: 1;
}

/* ==========================================================
   ELIMINA DEFINITIVAMENTE GLI ELEMENTI DELLA VECCHIA LISTA
========================================================== */

.fh-formation-player-selection__list-header,
.fh-formation-player-selection__search,
.fh-formation-player-selection__role-tabs {
    display: none !important;
}

/* ==========================================================
   FHL FORMATION WORKSPACE
   WIDGET DEADLINE FORMAZIONE
   ========================================================== */

.fh-formation-widget .fh-formation-deadline,
.fh-formation-deadline {
    position: relative;
    width: 100%;
    box-sizing: border-box;

    padding: 16px 14px 14px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;

    background: #111820;

    overflow: hidden;
}


/* ==========================================================
   HEADER
   ========================================================== */

.fh-formation-deadline__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;

    margin-bottom: 12px;

    text-align: center;
}

.fh-formation-deadline__header h2 {
    width: 100%;

    margin: 0;

    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: 0.01em;
    text-transform: uppercase;

    color: #F7C600;

    text-align: center;
}

.fh-formation-deadline__header > span {
    display: block;

    width: 100%;

    margin-top: 6px;

    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;

    letter-spacing: 0;

    color: #93a3b8;

    text-align: center;
}


/* ==========================================================
   COUNTDOWN
   ========================================================== */

.fh-formation-deadline__countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin: 0 0 18px;
    padding: 16px 10px 17px;

    border-radius: 12px;

    background: #0d151d;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.fh-formation-deadline__countdown-label {
    margin-bottom: 8px;

    font-size: 9px;
    line-height: 1;
    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: #8b98a3;
}

.fh-formation-deadline__countdown-value {
    display: block;

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;

    font-weight: 800;

    letter-spacing: 0.04em;

    color: #ffc107;

    font-variant-numeric: tabular-nums;

    text-align: center;

    white-space: nowrap;
}


/* ==========================================================
   BLOCCO FORMAZIONE
   ========================================================== */

.fh-formation-deadline__lock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    padding: 10px 0 9px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    text-align: center;
}

.fh-formation-deadline__lock > span {
    display: block;

    font-size: 15px;
    line-height: 1.05;
    font-weight: 800;

    letter-spacing: 0;

    text-transform: uppercase;

    color: #ffffff;

    text-align: center;
}

.fh-formation-deadline__lock > strong {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;

    width: 100%;

    font-size: 13px;
    line-height: 1.1;
    font-weight: 800;

    color: #ffc107;

    text-align: center;
    white-space: nowrap;
}

.fh-formation-deadline__lock-date::after {
    content: " - ";
}

.fh-formation-deadline__lock-date,
.fh-formation-deadline__lock-time {
    color: #ffc107;
}


/* ==========================================================
   REGOLA OPERATIVA
   ========================================================== */

.fh-formation-deadline__rule {
    display: flex;
    flex-direction: column;
    align-items: center;

    margin-top: 14px;
    padding-top: 11px;

    border-top: 1px solid rgba(255, 255, 255, 0.07);

    text-align: center;
}

.fh-formation-deadline__rule span {
    font-size: 8px;
    line-height: 1;

    font-weight: 700;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    color: #7f8b94;
}

.fh-formation-deadline__rule strong {
    margin-top: 5px;

    font-size: 9px;
    line-height: 1.25;

    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;

    color: #ffc107;
}


/* ==========================================================
   NASCONDI ELEMENTI DI DEBUG / RIFERIMENTO
   ========================================================== */

.fh-formation-widget
.fh-formation-widget-reference,
.fh-formation-deadline__debug {
    display: none !important;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 700px) {

    .fh-formation-widget .fh-formation-deadline {
        padding: 16px;
        border-radius: 12px;
    }

    .fh-formation-deadline__header {
        margin-bottom: 15px;
    }

    .fh-formation-deadline__header h2 {
        font-size: 16px;
    }

    .fh-formation-deadline__header > span {
        margin-top: 16px;
        font-size: 14px;
    }

    .fh-formation-deadline__countdown {
        padding: 16px 10px 14px;
    }

    .fh-formation-deadline__countdown-value {
        font-size: clamp(26px, 8vw, 36px);
    }

    .fh-formation-deadline__lock > span {
        font-size: 14px;
    }

    .fh-formation-deadline__lock > strong {
        font-size: 12px;
    }
}

@media (max-width: 500px) {

    .fh-formation-deadline__header h2 {
        font-size: 15px;
    }

    .fh-formation-deadline__header > span {
        font-size: 13px;
    }

    .fh-formation-deadline__countdown-value {
        font-size: 29px;
    }

    .fh-formation-deadline__lock > span {
        font-size: 13px;
    }

    .fh-formation-deadline__lock > strong {
        font-size: 11px;
    }
}




/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 700px) {

    .fh-formation-widget .fh-formation-deadline {
        padding: 16px;
        border-radius: 12px;
    }

    .fh-formation-deadline__header {
        margin-bottom: 15px;
    }

    .fh-formation-deadline__header h2 {
        font-size: 16px;
    }

    .fh-formation-deadline__header > div:first-child span {
        font-size: 11px;
    }

    .fh-formation-deadline__countdown {
        padding: 16px 10px 14px;
    }

    .fh-formation-deadline__countdown-value {
        font-size: clamp(26px, 8vw, 36px);
    }
}


@media (max-width: 500px) {

    .fh-formation-deadline__header {
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .fh-formation-deadline__status {
        align-self: flex-start;
    }

    .fh-formation-deadline__permissions {
        grid-template-columns: 1fr;
    }

    .fh-formation-deadline__countdown-value {
        font-size: 29px;
    }

    .fh-formation-deadline__lock span {
        font-size: 9px;
    }

    .fh-formation-deadline__lock strong {
        font-size: 12px;
    }
}



/* ==========================================================
   RESPONSIVE PLAYER SELECTION
========================================================== */

@media (max-width: 500px) {

    .fh-formation-player-selection__group
    .fh-formation-player-card {
        grid-template-columns:
            36px
            minmax(0, 1fr)
            34px
            30px
            30px;

        gap: 5px;
    }

    .fh-formation-player-selection__group
    .fh-formation-player-card__avatar {
        width: 36px;
        height: 36px;

        flex-basis: 36px;
    }

    .fh-formation-player-selection__group
    .fh-formation-player-card__role {
        width: 34px;
        min-width: 34px;
    }

}

/* Nasconde il vecchio contatore GIOCATORI IN PANCHINA 0/25 */
.fh-formation-bench-selection__footer-status:first-child {
    display: none !important;
}