/* ═══════════════════════════════════════════════════════
   Fixture Detail Widget — fixture-detail-widget.css
   โครงสร้างและการจัดวางเท่านั้น
   สี / font-size / ตกแต่ง → ปรับผ่าน Elementor UI
   ═══════════════════════════════════════════════════════ */

/* ── Wrapper ── */
.fd-wrapper { font-family: inherit; }

/* ── Header ── */
.fd-header { padding: 16px; border-radius: 8px 8px 0 0; }

.fd-header-league {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px;
}
.fd-header-league img { width: 20px; height: 20px; object-fit: contain; }

.fd-header-teams {
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
}
.fd-team-block {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px; flex: 1;
}
.fd-team-block img { width: 52px; height: 52px; object-fit: contain; }
.fd-team-name  { font-weight: 600; text-align: center; }

.fd-score-block {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
}
.fd-score-main { font-weight: 700; letter-spacing: 4px; }

/* ── Tabs ── */
.fd-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-top: 0px;
    border-top: 1px solid #eee;
}
.fd-tab {
    flex: 1; padding: 10px 0;
    text-align: center; font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
}

/* ── Tab Panels ── */
.fd-panel        { display: none; padding: 12px 0; }
.fd-panel.active { display: block; }

/* ── Events ── */
.fd-event {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.fd-event:last-child { border-bottom: none; }
.fd-event-time   { width: 36px; font-weight: 700; text-align: center; flex-shrink: 0; }
.fd-event-icon   { width: 20px; text-align: center; flex-shrink: 0; }
.fd-event-info   { flex: 1; }
.fd-event-player { font-weight: 600; }
.fd-event-team   { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }

/* ── Statistics ── */
.fd-stat-row   { padding: 10px 12px; }
.fd-stat-label { text-align: center; margin-bottom: 4px; }
.fd-stat-bars  { display: flex; align-items: center; gap: 8px; }
.fd-stat-val   { width: 36px; font-weight: 700; text-align: center; flex-shrink: 0; }
.fd-stat-val.right { text-align: right; }
.fd-bar-wrap   { flex: 1; height: 6px; border-radius: 3px; overflow: hidden; }
.fd-bar-home, .fd-bar-away { height: 100%; border-radius: 3px; transition: width .4s; }
.fd-bar-away   { float: right; }

/* ══════════════════════════════════════════════════════
   PITCH — improved, same HTML structure as original
   ══════════════════════════════════════════════════════ */

.fd-pitch {
    border-radius: 10px;
    overflow: hidden;
    
    position: relative;
    /* Alternating grass stripes */
    background-color: #2d8a4e;
    background-image: repeating-linear-gradient(
        180deg,
        transparent       0px,
        transparent       44px,
        rgba(0,0,0,0.07)  44px,
        rgba(0,0,0,0.07)  88px
    );
    box-shadow: inset 0 0 60px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.15);
}

/* Outer field border */
.fd-pitch::before {
    content: '';
    position: absolute;
    inset: 14px 18px;
    border: 1.5px solid rgba(255,255,255,0.22);
    border-radius: 2px;
    pointer-events: none;
    z-index: 0;
}

.fd-pitch-half {
    padding: 8px 4px;
    display: flex; flex-direction: column; gap: 6px;
    position: relative;
}
.fd-pitch-away { padding-bottom: 20px; }
.fd-pitch-home { padding-top: 20px; }

/* ── Goal area (6-yard box) ── */
.fd-pitch-gkbox {
    position: absolute; left: 50%; transform: translateX(-50%);
    width: 30%; height: 50px;
    border: 1.5px solid rgba(255,255,255,0.4);
    pointer-events: none;
    z-index: 1;
}
.fd-pitch-away .fd-pitch-gkbox { top: 0; border-top: none; border-radius: 0 0 4px 4px; }
.fd-pitch-home .fd-pitch-gkbox { bottom: 0; border-bottom: none; border-radius: 4px 4px 0 0; }

/* Penalty spot inside gkbox */
.fd-pitch-gkbox::after {
    content: '';
    position: absolute;
    left: 50%; transform: translateX(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
}
.fd-pitch-away .fd-pitch-gkbox::after { bottom: 10px; }
.fd-pitch-home .fd-pitch-gkbox::after { top: 10px; }

/* ── Halfway line + centre circle ── */
.fd-pitch-midwrap {
    position: relative; height: 5px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.fd-pitch-midwrap::before {
    content: ''; position: absolute;
    left: 18px; right: 18px; top: 50%;
    height: 1.5px; background: rgba(255,255,255,0.3);
}
.fd-pitch-circle {
    width: 90px; height: 90px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.3);
    position: relative; z-index: 1; flex-shrink: 0;
}
.fd-pitch-circle::after {
    content: ''; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
}

/* ── Players ── */
.fd-pitch-row {
    display: flex; justify-content: space-evenly; align-items: center;
    position: relative; z-index: 3;
}
.fd-pitch-player {
    display: flex; flex-direction: column;
    align-items: center; gap: 3px; width: 54px;
}
.fd-pitch-player-inner {
    position: relative; width: 40px; height: 40px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.55));
    transition: transform .15s ease;
}
.fd-pitch-player:hover .fd-pitch-player-inner { transform: scale(1.1); }

.fd-pitch-player-inner img {
    width: 40px; height: 40px; border-radius: 50%;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.35);
}
.fd-pitch-num {
    position: absolute; top: -3px; right: -3px;
    font-weight: 700; border-radius: 50%;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1; font-size: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.45);
    z-index: 2;
}
.fd-pitch-name {
    text-align: center; line-height: 1.2;
    max-width: 54px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.28);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: 600;
}

/* ── Bench ── */
.fd-bench-wrap  { padding: 0 12px 12px; }
.fd-bench-teams { display: flex; gap: 8px; }
.fd-bench-col   { flex: 1; min-width: 0; }

.fd-bench-header {
    display: flex; align-items: center; gap: 6px;
    font-weight: 700; padding: 8px 0 4px;
}
.fd-bench-header img { width: 18px; height: 18px; object-fit: contain; }
.fd-bench-formation  { margin-left: auto; }

.fd-bench-player {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 0; border-bottom: 1px solid #f5f5f5;
}
.fd-bench-player:last-child { border-bottom: none; }
.fd-bench-photo {
    width: 26px; height: 26px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.fd-bench-num {
    width: 18px; height: 18px; border-radius: 50%;
    font-weight: 700;
    display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.fd-bench-pos  { width: 14px; flex-shrink: 0; text-align: center; }
.fd-bench-name {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── States ── */
.fd-empty   { text-align: center; padding: 30px; }
.fd-loading { text-align: center; padding: 30px; }
.fd-error   { text-align: center; padding: 30px; }

.fd-score { display: flex; align-items: baseline; gap: 4px; }
.fd-score-regular { font-size: 2rem; font-weight: 700; }
.fd-score-pen { font-size: 1.1rem; font-weight: 600; color: #aaa; }
.fd-score-sep { font-size: 1.5rem; margin: 0 4px; }