/* Ascunde Titlu pagina */
h1.wp-block-post-title, footer.wp-block-template-part {
    display: none;
}

/* A D M I N */
/* Bara verde de succes */
div#sa-admin-notices .notice.notice-success {
    background: #4fda84;
    border-left: none;
    color: #fff;
    font-weight: 700;
}
div#sa-admin-notices .notice.notice-success p {
    font-size: 15px;
}
/* Butonul X de inchidere a barei Succes */
div#sa-admin-notices .notice.notice-success .notice-dismiss::before {
    content: '\f153'; /* Acesta este codul Dashicon pentru X */
    display: inline-block;
    font: normal 20px/1 dashicons;
    speak: never;
    -webkit-font-smoothing: antialiased;
    color: #fff !important;
    vertical-align: middle;
}
div#sa-admin-notices .notice.notice-success {
    padding-right: 40px;
    position: relative;
}


/* A D M I N - Pagina principala */
span.dashicons.dashicons-awards {
    font-size: 30px;
    padding-right: 10px;
}


/* A D M I N - Pagina GESTIONARE TURNEE */
span.dashicons.dashicons-shield {
    font-size: 30px;
    padding-right: 10px;
}
/* Sectiunea - Adauga turneu */
.add-tournament .sa-admin-card {
    background: #caf0f8;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
}
#sa-add-tournament-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}
/* Sectiune - Tabel turnee */
.admin-tournaments thead {
    background: #2271b1;
}
.admin-tournaments thead tr th {
    color: #fff;
    font-weight: 700;
    text-align: center;
}
.admin-tournaments tbody tr td {
    background: #caf0f8;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
}


/* A D M I N - Pagina GESTIONARE ECHIPE */
span.dashicons.dashicons-groups {
    font-size: 30px;
    padding-right: 10px;
}
/* Sectiunea - Adauga echipa */
.sa-tournament-filter {
    padding: 15px;
    border: 1px solid #ccd0d4;
    margin-bottom: 20px;
}
.add-team .sa-admin-card {
    background: #caf0f8;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ccd0d4;
}
#sa-add-team-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}
/* Sectiune - Tabel echipe turneu */
.admin-teams thead {
    background: #2271b1;
}
.admin-teams thead tr th {
    color: #fff;
    font-weight: 700;
    text-align: center;
}
tbody#sa-teams-list {
    background: #caf0f8;
}

/* A D M I N - Pagina Gestionare Meciuri */
span.dashicons.dashicons-clipboard {
    font-size: 30px;
    padding-right: 10px;
}
.admin-scores thead {
    background: #2271b1;
}
.admin-scores thead tr th {
    color: #fff;
    font-weight: 700;
    text-align: center;
}
.admin-scores tbody tr td {
    background: #caf0f8;
    text-align: center;
    white-space: nowrap;
    font-size: 14px;
}

/* A D M I N  TABEL MECIURI */
.sa-matches-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sa-matches-table th {
    background: #27ae60;
    color: #fff;
    font-weight: bold;
}

.sa-matches-table th, .sa-matches-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.sa-match-flex-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sa-team-display {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sa-team-display.home-side {
    justify-content: flex-end;
    font-weight: 400;
}

.sa-team-display.away-side {
    justify-content: flex-start;
    font-weight: 400;
}

.sa-match-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sa-vs-label {
    font-weight: bold;
    color: #999;
}

.sa-score-cell {
    color: #e67e22; /* Portocaliu pentru scor să iasă în evidență */
    font-size: 1.1em;
}

/* Containerul Live */
.sa-live-indicator {
    color: #e74c3c;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
/* Bulina care clipește */
.sa-blink-dot {
    height: 8px;
    width: 8px;
    background-color: #e74c3c;
    border-radius: 50%;
    display: inline-block;
    animation: blinker 1.5s linear infinite;
}
@keyframes blinker {
    50% { opacity: 0; }
}
/* Stil extra pentru scorul Live */
.sa-live-indicator + span {
    color: #2ecc71; /* Scorul devine verde când e live */
    font-size: 1.3em;
}


/* A D M I N - Pagina FORMARE GRUPE */
/* Icon (dashicon) */
span.dashicons.dashicons-randomize {
    font-size: 30px;
    padding-right: 10px;
}
/* Formular Formare Grupe */
.add-group .sa-admin-card {
    padding: 20px;
    border: 1px solid #ccd0d4;
}
/* Casete echipe si urne */
.team-pot-row {
    background: #caf0f8 !important;
}


/* A D M I N - Pagina Gestionare meciuri eliminatorii */
.add-meci-el {
    background:#caf0f8;
    padding:20px;
    border:1px solid #ccc;
    margin-top:20px;
}
/* Stilizare header tabel meciuri eliminatorii*/
table.wp-list-table.widefat.fixed.striped thead tr th {
    background: #2271b1;
    color: #fff;
    font-weight: 700;
}
table.wp-list-table.widefat.fixed.striped tbody tr td {
    background: #caf0f8;
}


/* P A G I N A   T U R N E U  Front-end */
.scorearena-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
}

.sa-category-selector {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.sa-cat-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.sa-cat-btn:hover {
    background: #005177;
}

.sa-cat-btn.active {
    background-color: #29ab87; /*#27ae60;*/ /* Verde când categoria e selectată */
}


/* C L A S A M E N T  Front-end */
h3.grupa {
    color: #2271b1;
    font-weight: 700;
    text-align: left;
    padding: 10px;
    margin: 0;
}

.sa-standing-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sa-standing-table th {
    background: #2271b1;
    color: #fff;
    padding: 10px;
    font-size: 15px;
}

.sa-standing-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.text-left {
    text-align: left;
}

.sa-points {
    font-weight: 400;
}

.sa-separator {
    margin: 40px 0;
    border: 0;
    border-top: 2px dashed #ccc;
}


/* C A R D   M E C I  Front-end */
body.page {
    background: #fff;
}

.sa-matches-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    justify-content: center;
    padding: 15px;
    background: #f0f7ff; /* Fundalul paginii ușor albăstrui */
}

/* Carduri Meciuri eliminatorii */
.sa-matches-container.eliminatorii {
    background: #f1f9f0;
}

.sa-match-card {
    background: #e1f0ff; /* Albastrul deschis din card */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    text-align: center;
}

/* Badge-ul de sus (LIGA 1 PLAYOFF) */
.sa-card-header {
    padding: 10px;
}
.sa-badge {
    background: white;
    color: #2271b1;
    padding: 4px 15px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Zona centrală: Echipe și VS */
.sa-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 20px;
}

.sa-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sa-team img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.sa-team-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.sa-main-score {
    font-size: 24px;
    font-weight: bold;
    color: #444;
}

.sa-score-area {
    padding: 0 15px;
}

/* Footer-ul albastru închis de jos */
.sa-card-footer {
    background: #bcd9f5;
    padding: 12px;
    display: flex;
    justify-content: center;
    gap: 15px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #333;
}

/* Live indicator */
.sa-live-pill {
    background: red;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 5px;
    animation: blink 1s infinite;
}

@keyframes blink { 50% { opacity: 0.5; } }


/* T A B E L   M E C I U R I  Front-end */
/* Wrapper Clasament + Meciuri */
.sa-group-wrapper {
    background: #F0F8FF;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 100px;
}

.sa-table-responsive {
    width: 100% !important;
    display: block;      /* Forțează containerul să se comporte ca un bloc full-width */
    overflow-x: auto;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.sa-table-responsive table {
    width: 100% !important;
    min-width: 100%;       /* Îl împiedică să se micșoreze dacă celulele sunt goale */
    border-collapse: collapse;
    margin: 0 auto;        /* Îl centrează dacă totuși rămâne spațiu */
}

/* Ajustăm celulele pentru a profita de tot spațiul pe ecrane mici */
.sa-table-responsive th,
.sa-table-responsive td {
    padding: 10px 5px;
    text-align: center;
    word-wrap: break-word;
}

.sa-group-matches {
    padding-top: 30px;
}

/* Container pentru scroll pe mobil */
.sa-classic-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

/* Tabelul clasic */
.sa-classic-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    border: 2px solid black;
    background-color: white;
}

/* Header-ul tabelului */
.sa-classic-table th {
    border: 1px solid #000;
    padding: 8px;
    background-color: #18abf8;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    white-space: nowrap;
}

/* Header tabel meciuri eliminatorii */
.eliminatorii-th th {
    background: #29AB87;
}

/* Celulele tabelului */
.sa-classic-table td {
    border: 1px solid #000;
    padding: 6px 10px;
    text-align: center;
    color: #000;
    font-size: 15px;
    white-space: nowrap;
}

/* Aliniere nume echipe la stânga (opțional, în poză par centrate) */
.sa-classic-table td.team-name {
    text-align: center;
    min-width: 150px;
}

/* Celulele de scor (mai înguste) */
.sa-classic-table td.score-cell {
    width: 30px;
    font-weight: 700;
    background: #f1f1f1;
}

/* Culorile rândurilor conform imaginii */
.sa-classic-table tr.row-yellow td {
    background-color: #ffff00 !important; /* Galben intens */
}

.sa-classic-table tr.row-green td {
    background-color: #00ff00 !important; /* Verde intens */
}

/* Efect de hover discret */
.sa-classic-table tr:hover td {
    filter: brightness(0.95);
}


/*** Meciuri eliminatorii ***/
.sa-knockout-container {
    max-width: 600px;
    margin: 20px auto;
}
.sa-match-card {
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    background: #f9f9f9;
}
.sa-match-type {
    font-weight: bold;
    color: #0073aa;
    text-transform: uppercase;
}




/* T E L E F O N */
@media only screen and (max-width: 768px) {
    /* Tabel meciuri front-end */
    .sa-group-wrapper {
        padding: 0;
    }
    .sa-table-responsive {
        /* Forțăm lățimea să fie cea a ecranului (viewport width) */
        width: calc(100% + 40px) !important;
        /* Tragem tabelul înapoi peste padding-ul de 20px al părintelui */
        margin-left: -20px !important;
        margin-right: -20px !important;
        /* Resetăm orice limită de lățime */
        max-width: none !important;
        /* Ne asigurăm că nu apar scroll-uri ciudate pe orizontală */
        overflow-x: auto;
    }
    .sa-table-responsive table {
        width: 100% !important;
        border-radius: 0; /* Opțional: eliminăm colțurile rotunjite pe mobil ca să atingă marginea perfect */
    }

    /* Admin - Tabel scoruri */
    /* Sectiune filtrare */
    .sa-tournament-filter {
        padding-left: 0 !important;
    }
     select#sa_tournament_select {
        margin-top: 10px;
        margin-left: 0 !important;
    }
    /* Afisare pe mobil a filtrelor */
    .alignleft.actions {
        display: flex !important;
        padding-bottom: 20px;
    }
    /* Ascundere coloane */
    table.wp-list-table.widefat.ad-tab-meciuri th:nth-child(1),
    table.wp-list-table.widefat.ad-tab-meciuri td:nth-child(1),
    table.wp-list-table.widefat.ad-tab-meciuri th:nth-child(2),
    table.wp-list-table.widefat.ad-tab-meciuri td:nth-child(2),
    table.wp-list-table.widefat.ad-tab-meciuri th:nth-child(3),
    table.wp-list-table.widefat.ad-tab-meciuri td:nth-child(3) {
        display: none;
    }


}


/* D E S K T O P */
@media only screen and (min-width: 769px) {

    /* Afisare carduri meciuri eliminatorii */
    .sa-matches-container.eliminatorii {
        grid-template-columns: 1fr;
    }


}
