/* ============================================================
   WP Live Football Score – Frontend Styles
   ============================================================ */

/* --- Reset & Base --- */
.wplfs-scoreboard *,
.wplfs-scoreboard *::before,
.wplfs-scoreboard *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.wplfs-match-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================================
   SCOREBOARD CARD
   ============================================================ */
.wplfs-scoreboard {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 680px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wplfs-scoreboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

/* ============================================================
   DARK THEME (default)
   ============================================================ */
.wplfs-theme-dark {
    background: linear-gradient(135deg, #0f1923 0%, #1a2a3a 50%, #0f1923 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.wplfs-theme-dark .wplfs-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wplfs-theme-dark .wplfs-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
}

.wplfs-theme-dark .wplfs-team-name {
    color: #e0e6ef;
}

.wplfs-theme-dark .wplfs-score-display {
    color: #ffffff;
}

.wplfs-theme-dark .wplfs-shield-placeholder {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.wplfs-theme-dark .wplfs-scorers {
    color: rgba(255, 255, 255, 0.65);
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
.wplfs-theme-light {
    background: linear-gradient(135deg, #f8faff 0%, #e8f0fe 50%, #f8faff 100%);
    color: #1a2a3a;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wplfs-theme-light .wplfs-header {
    background: rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.wplfs-theme-light .wplfs-footer {
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

.wplfs-theme-light .wplfs-team-name {
    color: #1a2a3a;
}

.wplfs-theme-light .wplfs-score-display {
    color: #1a2a3a;
}

.wplfs-theme-light .wplfs-shield-placeholder {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
}

.wplfs-theme-light .wplfs-scorers {
    color: rgba(0, 0, 0, 0.6);
}

.wplfs-theme-light .wplfs-media-badge {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.1);
}

.wplfs-theme-light .wplfs-media-name-text {
    color: rgba(0, 0, 0, 0.7);
}

/* ============================================================
   HEADER
   ============================================================ */
.wplfs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    gap: 12px;
}

.wplfs-header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.wplfs-league-badge {
    font-size: 12px;
    opacity: 0.85;
}

.wplfs-tournament-badge {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

/* ============================================================
   STATUS BADGE
   ============================================================ */
.wplfs-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wplfs-status-live {
    background: #e53e3e;
    color: #fff;
    animation: wplfs-pulse-bg 2s ease-in-out infinite;
}

.wplfs-status-halftime {
    background: #d69e2e;
    color: #fff;
}

.wplfs-status-finished {
    background: #38a169;
    color: #fff;
}

.wplfs-status-scheduled {
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
}

.wplfs-status-postponed {
    background: rgba(255, 165, 0, 0.25);
    color: #ffa500;
}

/* Live dot animation */
.wplfs-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: wplfs-blink 1.2s ease-in-out infinite;
}

@keyframes wplfs-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

@keyframes wplfs-pulse-bg {
    0%, 100% { background: #e53e3e; }
    50% { background: #c53030; }
}

.wplfs-minute {
    font-size: 13px;
    font-weight: 800;
}

/* ============================================================
   SCORE AREA
   ============================================================ */
.wplfs-score-area {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 28px 20px 24px;
    gap: 16px;
    position: relative;
}

/* Media Badge (Corner Logo/Name) */
.wplfs-media-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wplfs-media-logo-img {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.wplfs-media-name-text {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* ============================================================
   TEAM BLOCK
   ============================================================ */
.wplfs-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.wplfs-shield-wrap {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wplfs-shield {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s ease;
}

.wplfs-scoreboard:hover .wplfs-shield {
    transform: scale(1.05);
}

.wplfs-shield-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
}

.wplfs-team-name {
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    max-width: 140px;
}

/* ============================================================
   SCORE CENTER
   ============================================================ */
.wplfs-score-center {
    text-align: center;
    min-width: 120px;
}

.wplfs-score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    font-variant-numeric: tabular-nums;
}

.wplfs-score-divider {
    font-size: 40px;
    font-weight: 300;
    opacity: 0.6;
    margin: 0 4px;
}

.wplfs-score-vs {
    font-size: 28px;
    font-weight: 900;
    opacity: 0.5;
    letter-spacing: 4px;
}

.wplfs-match-date {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 6px;
}

.wplfs-halftime-label {
    font-size: 13px;
    font-weight: 700;
    color: #d69e2e;
    margin-top: 4px;
    letter-spacing: 2px;
}

/* ============================================================
   SCORERS LIST
   ============================================================ */
.wplfs-scorers {
    list-style: none;
    font-size: 12px;
    text-align: center;
    line-height: 1.8;
    max-width: 140px;
}

/* ============================================================
   MATCH DETAILS: STADIUM & REFEREE
   ============================================================ */
.wplfs-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.wplfs-theme-light .wplfs-details {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.wplfs-detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.wplfs-detail-icon {
    font-size: 16px;
    opacity: 0.8;
}

.wplfs-detail-text {
    font-weight: 500;
    opacity: 0.9;
}

/* ============================================================
   FOOTER
   ============================================================ */
.wplfs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    font-size: 11px;
}

.wplfs-auto-refresh {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #e53e3e;
    font-weight: 600;
}

.wplfs-auto-refresh::before {
    content: '↻';
    animation: wplfs-spin 2s linear infinite;
    display: inline-block;
}

@keyframes wplfs-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
   GOAL ANIMATION
   ============================================================ */
.wplfs-goal-flash {
    animation: wplfs-goal-anim 1.5s ease-out;
}

@keyframes wplfs-goal-anim {
    0%   { transform: scale(1); }
    20%  { transform: scale(1.25); color: #ffd700; }
    40%  { transform: scale(1.1); }
    60%  { transform: scale(1.2); color: #ffd700; }
    100% { transform: scale(1); }
}

/* ============================================================
   ERROR / EMPTY STATES
   ============================================================ */
.wplfs-error,
.wplfs-no-matches {
    padding: 16px;
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.3);
    border-radius: 8px;
    color: #e53e3e;
    font-size: 14px;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .wplfs-score-display {
        font-size: 40px;
    }
    .wplfs-shield-wrap {
        width: 60px;
        height: 60px;
    }
    .wplfs-shield,
    .wplfs-shield-placeholder {
        max-width: 60px;
        max-height: 60px;
        width: 60px;
        height: 60px;
    }
    .wplfs-team-name {
        font-size: 13px;
        max-width: 100px;
    }
    .wplfs-score-area {
        padding: 20px 12px 16px;
        gap: 8px;
    }
    .wplfs-score-center {
        min-width: 90px;
    }
    .wplfs-note-link-text {
        font-size: 12px;
    }
}

/* ============================================================
   NOTE LINK TEXT (inline with date)
   ============================================================ */
.wplfs-note-link-text {
    display: block;
    font-size: 13px;
    color: #ffffff;
    text-decoration: none;
    margin-top: 6px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    width: 100%;
    transition: opacity 0.2s ease;
    opacity: 0.8;
}

.wplfs-note-link-text:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ============================================================
   NARROW COLUMN OPTIMIZATION (350px width)
   ============================================================ */
@media (max-width: 380px) {
    .wplfs-scoreboard {
        margin: 0 auto 16px;
        border-radius: 12px;
    }
    
    .wplfs-header {
        padding: 12px 12px !important;
    }
    
    .wplfs-league-badge {
        font-size: 11px !important;
    }
    
    .wplfs-status-badge {
        font-size: 11px !important;
    }
    
    .wplfs-score-area {
        padding: 16px 8px 12px !important;
        gap: 6px !important;
    }
    
    .wplfs-score-display {
        font-size: 32px !important;
        gap: 2px !important;
    }
    
    .wplfs-score-divider {
        font-size: 24px !important;
    }
    
    .wplfs-score-vs {
        font-size: 20px !important;
    }
    
    .wplfs-shield-wrap {
        width: 50px !important;
        height: 50px !important;
    }
    
    .wplfs-shield,
    .wplfs-shield-placeholder {
        max-width: 50px !important;
        max-height: 50px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 16px !important;
    }
    
    .wplfs-team-name {
        font-size: 12px !important;
        max-width: 80px !important;
        line-height: 1.2 !important;
    }
    
    .wplfs-scorers {
        font-size: 10px !important;
    }
    
    .wplfs-score-center {
        min-width: 70px !important;
    }
    
    .wplfs-match-date {
        font-size: 11px !important;
        margin-top: 4px !important;
    }
    
    .wplfs-note-link-text {
        font-size: 11px !important;
        margin-top: 4px !important;
    }
    
    .wplfs-details {
        padding: 10px 12px !important;
        gap: 8px !important;
    }
    
    .wplfs-detail-item {
        font-size: 11px !important;
    }
    
    .wplfs-detail-icon {
        font-size: 14px !important;
        margin-right: 4px !important;
    }
    
    .wplfs-footer {
        padding: 8px 12px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 320px) {
    .wplfs-scoreboard {
        margin: 0 auto 12px;
        border-radius: 10px;
    }
    
    .wplfs-header {
        padding: 10px 10px !important;
    }
    
    .wplfs-league-badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    .wplfs-status-badge {
        font-size: 10px !important;
        padding: 4px 8px !important;
    }
    
    .wplfs-score-area {
        padding: 10px 8px 8px !important;
        gap: 6px !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .wplfs-team {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .wplfs-score-display {
        font-size: 32px !important;
        gap: 8px !important;
        order: 2 !important;
    }
    
    .wplfs-score-divider {
        font-size: 24px !important;
        margin: 0 4px !important;
    }
    
    .wplfs-score-vs {
        font-size: 14px !important;
        letter-spacing: 2px !important;
    }
    
    .wplfs-shield-wrap {
        width: 45px !important;
        height: 45px !important;
    }
    
    .wplfs-shield,
    .wplfs-shield-placeholder {
        max-width: 45px !important;
        max-height: 45px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 16px !important;
    }
    
    .wplfs-team-name {
        font-size: 12px !important;
        max-width: 100px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
    
    .wplfs-scorers {
        font-size: 10px !important;
        max-width: 100% !important;
    }
    
    .wplfs-score-center {
        min-width: auto !important;
        order: 1 !important;
    }
    
    .wplfs-match-date {
        font-size: 11px !important;
        margin-top: 6px !important;
    }
    
    .wplfs-note-link-text {
        font-size: 11px !important;
        margin-top: 4px !important;
    }
    
    .wplfs-details {
        padding: 10px 10px !important;
        gap: 8px !important;
        flex-direction: column !important;
    }
    
    .wplfs-detail-item {
        font-size: 11px !important;
        min-width: auto !important;
        flex: none !important;
    }
    
    .wplfs-detail-icon {
        font-size: 13px !important;
        margin-right: 4px !important;
    }
    
    .wplfs-footer {
        padding: 8px 10px !important;
        font-size: 10px !important;
    }
}

