/**
 * Cricket Match Styles
 * Contains all styles for cricket match templates
 *
 * @package ISPV2
 */

/* ============================================
   MASTHEAD STYLES
   ============================================ */

.masthead {
    max-width: 980px;
    margin: 11px auto;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.10), transparent 45%),
        linear-gradient(180deg, #2f63ff, #2a55f3);
}

.masthead-title {
    padding: 9px 11px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.4);
}

.masthead-status {
    text-align: center;
    margin: 7px 0;
}

.masthead-status span {
    background: #37384d;
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
}

.scorecard {
    padding: 7px 18px 10px;
}

.teams-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 6px;
}

.team {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 160px;
    font-size: 12px;
    font-weight: 600;
}

.team.left {
    justify-content: flex-end;
    text-align: right;
}

.team.right {
    justify-content: flex-start;
    text-align: left;
}

.team-logo {
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: .5px solid rgba(247, 247, 247, .5);
    width: 30px;
    height: 20px;
}

.scores-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.score {
    font-size: 22px;
    font-weight: 800;
}

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

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

.score.left, .score.right{
    display: flex;
    flex-direction: column;
    text-align :center
}

.score.winner {
    color: #ffd200;
}

.overs {
    font-size: 11px;
    opacity: 0.85;
    margin-left: 4px;
}

.vs {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 800;
    color: #fff;
}

.result-bar {
    margin: 0 18px 0;
    padding: 8px;
    background: rgba(0,0,0,0.15);
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.match-date {
    text-align: center;
    padding: 8px 0 14px;
    font-size: 12px;
    opacity: 0.9;
}

/* ============================================
   LIVE SCORE / SUMMARY STYLES
   ============================================ */

.summary {
    max-width: 980px;
    margin: 12px auto;
    display: flex;
    gap: 40px;
    padding: 15px;
}

.summary-col {
    width: 50%;
}

.summary h4 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.summary-val {
    font-weight: 600;
}

/* ============================================
   COMMENTARY STYLES
   ============================================ */

.commentary-container {
    max-width: 980px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.commentary-tab-button {
    flex-shrink: 0;
    min-width: 150px;
    text-align: center;
    padding: 12px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.commentary-tab-button.active {
    border-bottom-color: #2f63ff;
    color: #2f63ff;
    background-color: transparent;
}

.commentary-tab-button:not(.active):hover {
    color: #2f63ff;
    background-color: #f3f4f6;
}

.commentary-content {
    padding: 20px;
    min-height: 400px;
}

.commentary-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.commentary-item:last-child {
    border-bottom: none;
}

/* Run box - left aligned */
.commentary-run-box {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    background: #fff;
    font-weight: 600;
    font-size: 16px;
    border-radius: 2px;
}

/* Commentary details section */
.commentary-details {
    flex: 1;
    min-width: 0;
}

.commentary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.commentary-over-ball {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
}

.commentary-players {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.commentary-outcome {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.commentary-description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin-top: 4px;
}

/* Overend styling */
.commentary-item.commentary-overend {
    background-color: #f9fafb;
    padding: 12px 16px;
    border-left: 3px solid #3b82f6;
    margin: 16px 0;
}

.commentary-item.commentary-overend .commentary-run-box {
    display: none;
}

.commentary-item.commentary-overend .commentary-description {
    font-weight: 500;
    color: #111827;
}

/* Wicket styling */
.commentary-item.commentary-wicket {
    background-color: #fef2f2;
    padding: 12px 16px;
    border-left: 3px solid #ef4444;
}

.commentary-item.commentary-wicket .commentary-run-box {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Four/Six highlighting */
.commentary-item.commentary-four .commentary-run-box {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #2563eb;
}

.commentary-item.commentary-six .commentary-run-box {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #16a34a;
}

#commentary-loading,
#commentary-error {
    padding: 40px 20px;
    text-align: center;
}

#commentary-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#commentary-pagination button {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

#commentary-pagination button:hover:not(:disabled) {
    background-color: #f3f4f6;
}

#commentary-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* live score */

/* SUMMARY (FIXED) */
.summary {
    max-width: 980px;
    margin: 0;
    display: flex;
    gap: 40px;
    padding: 17px 15px 10px;
}

.summary-col {
    width:50%;
}

.summary h4 {
    font-size:12px;
    font-weight:700;
    margin-bottom:12px;
}

.summary-row {
    display:flex;
    justify-content:space-between;
    font-size:12px;
    margin-bottom:10px;
}

.summary-val {
    font-weight:600;
}

.summary-team-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #2f63ff;
    background: #eef2ff;
    border-radius: 3px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.03em;
}


.match-tabs {
    max-width: 980px;
    margin: 0 auto 14px;
}
.match-tabs-nav {
    background: #37384d;
    border-bottom: 1px solid #3e4254;
}
.match-tabs-nav-inner {
    display: flex;
    gap: 31px;
    padding: 1px 16px 0;
    justify-content: center;
}
.match-tab-btn {
    background: none;
    border: none;
    padding: 8px 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #cfd3e6;
    cursor: pointer;
    position: relative;
}
.match-tab-btn:hover {
    color: #ffffff;
}
.match-tab-btn.active {
    color: #fecc19;
}
.match-tabs-content {
    background: #ffffff;
}
.match-tab-panel {
    display: none;
}
.match-tab-panel.active {
    display: block;
}
button.match-tab-btn:not(:last-child)::after {
    content: "";
    width: 1px;
    height: 15px;
    background: #5f606f;
    transform: translateY(-50%);
    position: absolute;
    top: 50%;
    right: -16px;
}

