/* LivePro dark theme – stabilno, ne dira admin */

/* Glavni wrapper plugina */
.ss-livepro-wrapper {
    background: #10151c;
    color: #ffffff;
    padding: 16px;
    border-radius: 10px;
    max-width: 960px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
}

/* Header */
.ss-live-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    border-bottom: 1px solid #202632;
    padding-bottom: 6px;
}

.ss-live-title {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
}

.ss-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e11;
    margin-right: 8px;
    animation: lp-pulse 1.2s infinite;
}

@keyframes lp-pulse {
    0% { transform: scale(1); opacity: .8; }
    50% { transform: scale(1.4); opacity: 1; }
    100% { transform: scale(1); opacity: .8; }
}

.ss-live-meta {
    font-size: 13px;
    color: #a0a7b4;
}

/* Sport tabs */
.ss-sport-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ss-sport-tab {
    padding: 8px 14px;
    background: #161d27;
    border-radius: 999px;
    color: #cfd3dd;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #252b37;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.ss-sport-tab:hover {
    background: #1b2330;
}

.ss-sport-tab.active {
    background: #238636;
    border-color: #238636;
    color: #ffffff;
}

/* Lista mečeva */
.ss-live-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Kartica meča */
.ss-live-row {
    background: #161d27;
    border-radius: 10px;
    border: 1px solid #252b37;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ss-live-row:hover {
    border-color: #238636;
    background: #1b2330;
}

/* Liga */
.ss-live-league {
    grid-column: 1 / 3;
    font-size: 12px;
    font-weight: 600;
    color: #7ab0ff;
    margin-bottom: 4px;
}

/* Timovi + rezultat */
.ss-live-match {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ss-live-team {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
}

.ss-team-side {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-live-team-name {
    font-weight: 500;
}

.ss-live-score {
    font-weight: 700;
    min-width: 60px;
    text-align: right;
}

/* Desna kolona – vreme + status */
.ss-live-meta-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.ss-live-time {
    font-size: 13px;
    color: #ffffff;
}

/* Badge za status */
.ss-live-badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.ss-live-badge-live {
    background: #e11;
    color: #fff;
}

.ss-live-badge-ft {
    background: #555;
    color: #fff;
}

.ss-live-badge-ht {
    background: #facc15;
    color: #000;
}

/* Loading poruka */
.ss-live-loading {
    text-align: center;
    padding: 18px;
    font-size: 15px;
    color: #a0a7b4;
}

/* Modal backdrop – centrirano (JS pali/gasi display) */
.ss-livepro-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Modal box */
.ss-livepro-modal {
    background: #161d27;
    border-radius: 10px;
    border: 1px solid #252b37;
    padding: 18px 20px 18px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 18px 40px rgba(0,0,0,.7);
    position: relative;
    color: #ffffff;
}

.ss-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: #a0a7b4;
    font-size: 22px;
    cursor: pointer;
}

.ss-modal-close:hover {
    color: #ffffff;
}

.ss-modal-league {
    font-size: 13px;
    font-weight: 600;
    color: #7ab0ff;
    margin-bottom: 8px;
}

/* TEAMS u modalu – simetrično */
.ss-modal-teams-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 8px;
    margin-bottom: 8px;
}

.ss-modal-team {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-modal-team-home {
    justify-content: flex-start;
}

.ss-modal-team-away {
    justify-content: flex-end;
}

.ss-modal-team-name {
    font-size: 15px;
    font-weight: 600;
}

.ss-modal-vs {
    text-align: center;
    font-size: 12px;
    color: #a0a7b4;
}

.ss-modal-score {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.ss-modal-time-status {
    font-size: 13px;
    color: #cfd3dd;
    margin-bottom: 10px;
    text-align: center;
}

/* Statistika u modalu – kompaktno: label | home | away */
.ss-modal-stats {
    margin-top: 8px;
    border-top: 1px solid #252b37;
    padding-top: 8px;
    font-size: 13px;
    color: #cfd3dd;

    /* NOVO: sužavamo i centriramo celu statistiku */
    max-width: 460px;          /* probaj 240–280 po ukusu */
    margin-left: auto;
    margin-right: auto;
}

.ss-modal-stat-row {
    display: grid;
    grid-template-columns: 1.40fr 0.4fr 0.4fr; /* još uže kolone */
    column-gap: 4px;                           /* manji razmak */
    margin-bottom: 3px;
}


.ss-modal-stat-label {
    text-align: left;
    color: #d2d7e0;
    font-size: 13px;
}

.ss-modal-stat-home,
.ss-modal-stat-away {
    text-align: right;
    font-weight: 600;
    font-size: 13px;
    color: #ffffff;
}

/* Žuti kartoni – posebno obojeni (crvena nijansa oko reda) */
.ss-modal-stat-row-cards {
    background: rgba(220, 38, 38, 0.08);
    border-radius: 4px;
    padding: 2px 4px;
}
.ss-modal-stat-row-cards .ss-modal-stat-label {
    color: #fecaca;
}
.ss-modal-stat-row-cards .ss-modal-stat-home,
.ss-modal-stat-row-cards .ss-modal-stat-away {
    color: #fee2e2;
}

/* Posed – grafički bar */
.ss-possession-wrapper {
    margin-top: 6px;
    margin-bottom: 6px;

    /* NOVO: isti max-width kao stats, centriran */
    max-width: 260px;
    margin-left: auto;
    margin-right: auto;
}

.ss-possession-bar {
    display: flex;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #111827;
}

.ss-possession-home {
    background: #22c55e;
    height: 100%;
}

.ss-possession-away {
    background: #3b82f6;
    height: 100%;
}

.ss-possession-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-top: 3px;
    color: #cbd5f5;
}

/* Golovi sekcija */
.ss-modal-goals-title {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #252b37;
    font-size: 14px;
    font-weight: 600;
    color: #e2e7ef;
    margin-bottom: 6px;
}

.ss-goal-row {
    display: grid;
    grid-template-columns: 0.6fr 2fr 0.7fr;
    margin-bottom: 4px;
    font-size: 13px;
    color: #cfd3dd;
    column-gap: 6px;
}

.ss-goal-minute {
    font-weight: 700;
    color: #ffd556;
}

.ss-goal-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ss-goal-player-line {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ss-goal-icon {
    font-size: 14px;
}

.ss-goal-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #111827;
    border: 1px solid #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #e5e7eb;
    overflow: hidden;
}
.ss-goal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ss-goal-player {
    font-weight: 600;
}

.ss-goal-assist {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 22px; /* podvučeno ispod imena */
}

.ss-goal-side {
    text-align: right;
    opacity: .8;
    font-size: 12px;
}

/* Disciplina – kartoni po minutima */
.ss-discipline-title {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #252b37;
    font-size: 14px;
    font-weight: 600;
    color: #e2e7ef;
    margin-bottom: 6px;
}

.ss-card-row {
    display: grid;
    grid-template-columns: 0.6fr 2fr 0.7fr;
    margin-bottom: 4px;
    font-size: 13px;
    color: #cfd3dd;
    column-gap: 6px;
}

.ss-card-minute {
    font-weight: 700;
    color: #f97316;
}

.ss-card-main {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ss-card-icon {
    width: 10px;
    height: 14px;
    border-radius: 2px;
    display: inline-block;
}

/* žuti, crveni, drugi žuti */
.ss-card-yellow {
    background: #facc15;
}
.ss-card-red {
    background: #dc2626;
}
.ss-card-second_yellow {
    background: linear-gradient(90deg, #facc15 0%, #facc15 50%, #dc2626 50%, #dc2626 100%);
}

.ss-card-player {
    font-weight: 500;
}

.ss-card-type {
    font-size: 11px;
    color: #9ca3af;
}

.ss-card-side {
    text-align: right;
    opacity: .8;
    font-size: 12px;
}

/* League filter */
.ss-league-filter {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #252b37;
    background: #161d27;
    color: #cfd3dd;
    font-size: 13px;
    margin-left: 10px;
    max-width: 220px;
}
.ss-league-filter:focus {
    outline: none;
    border-color: #238636;
}

/* Mobile */
@media (max-width: 600px) {
    .ss-livepro-wrapper {
        padding: 12px;
    }

    .ss-live-row {
        padding: 10px;
    }

    .ss-livepro-modal {
        max-width: 92%;
        padding: 14px 14px 16px;
    }

    .ss-modal-team-name {
        font-size: 14px;
    }
}
