/* ============================================================
   Auto Post Sports — Widget CSS v4
   ZonaUtara.com
   ============================================================ */

/* ── BASE ── */
.aps-widget { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; line-height: 1.5; color: #1a1a1a; }
.aps-widget *, .aps-widget *::before, .aps-widget *::after { box-sizing: border-box; }
.aps-empty { padding: 14px; color: #888; font-size: 13px; text-align: center; }

/* ── WIDGET SHELL ── */
.aps-widget { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; margin-bottom: 24px; background: #fff; }
.aps-widget-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.aps-widget-title { font-weight: 600; font-size: 14px; color: #111; }
.aps-widget-sub { font-size: 12px; color: #6b7280; }
.aps-widget-footer { padding: 8px 16px; border-top: 1px solid #e5e7eb; background: #f9fafb; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.aps-source-link { font-size: 11px; color: #9ca3af; margin-left: auto; }
.aps-source-link a { color: #6b7280; text-decoration: none; }

/* ── KLASEMEN ── */
.aps-table-wrap { overflow-x: auto; }
.aps-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aps-table thead th { padding: 8px 10px; text-align: center; font-size: 11px; color: #6b7280; font-weight: 500; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.aps-table thead .aps-th-team { text-align: left; }
.aps-table thead .aps-th-num { width: 28px; }
.aps-table thead .aps-th-pts { font-weight: 700; color: #111; }
.aps-table thead .aps-th-form { min-width: 80px; }
.aps-table tbody td { padding: 8px 10px; text-align: center; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.aps-table tbody tr:last-child td { border-bottom: none; }
.aps-table tbody tr:hover { background: #f9fafb; }

.aps-td-num { position: relative; width: 36px; padding-left: 14px !important; }
.aps-zone-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 0 2px 2px 0; }
.aps-zb-ucl { background: #1a73e8; }
.aps-zb-uel { background: #f97316; }
.aps-zb-rel { background: #ef4444; }
.aps-td-team { text-align: left !important; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.aps-badge-img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.aps-td-pts { font-weight: 700; color: #111; }
.aps-td-form { min-width: 80px; }

.aps-form { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 3px; font-size: 10px; font-weight: 700; margin: 1px; }
.aps-form-w { background: #dcfce7; color: #166534; }
.aps-form-d { background: #f3f4f6; color: #374151; }
.aps-form-l { background: #fee2e2; color: #991b1b; }

.aps-zone-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #6b7280; }
.aps-zone-legend .aps-zb-ucl,
.aps-zone-legend .aps-zb-uel,
.aps-zone-legend .aps-zb-rel { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ── JADWAL / HASIL ── */
.aps-fixture { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #f3f4f6; }
.aps-fixture:last-of-type { border-bottom: none; }
.aps-fixture:hover { background: #f9fafb; }

.aps-fix-date { text-align: center; min-width: 44px; flex-shrink: 0; }
.aps-fix-dow { display: block; font-size: 10px; color: #9ca3af; text-transform: uppercase; }
.aps-fix-day { display: block; font-size: 22px; font-weight: 700; color: #111; line-height: 1; }
.aps-fix-mon { display: block; font-size: 11px; color: #6b7280; text-transform: uppercase; }
.aps-fix-date-sm { min-width: 80px; }
.aps-fix-date-sm span { font-size: 12px; color: #6b7280; }

.aps-fix-match { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aps-fix-team { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; flex: 1; min-width: 80px; }
.aps-fix-badge { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.aps-fix-badge-ph { width: 22px; height: 22px; background: #f3f4f6; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.aps-fix-vs { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; padding: 0 4px; }
.aps-fix-score { font-size: 16px; font-weight: 800; color: #111; letter-spacing: 1px; padding: 0 8px; white-space: nowrap; }
.aps-fix-time { font-size: 13px; font-weight: 600; color: #374151; text-align: right; white-space: nowrap; }

/* ── SCOREBOARD ARTIKEL ── */
.aps-sb { background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 50%, #2d4a6e 100%); color: #fff; border-radius: 14px; padding: 20px 16px 16px; margin: 0 0 24px; box-shadow: 0 4px 20px rgba(0,0,0,.2); text-align: center; font-family: -apple-system, sans-serif; }
.aps-sb-league { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #90caf9; margin-bottom: 16px; }
.aps-sb-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.aps-sb-team { flex: 1; min-width: 90px; }
.aps-sb-team img { height: 54px; width: auto; margin: 0 auto 8px; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.aps-sb-team strong { display: block; font-size: 14px; font-weight: 700; }
.aps-sb-team small { display: block; font-size: 10px; color: #90caf9; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.aps-sb-mid { padding: 0 12px; }
.aps-sb-score { display: block; font-size: 52px; font-weight: 900; letter-spacing: 2px; color: #ffd166; line-height: 1; }
.aps-sb-score em { font-style: normal; color: rgba(255,255,255,.2); font-size: 38px; margin: 0 4px; }
.aps-sb-mid small { display: block; font-size: 10px; color: #90caf9; text-transform: uppercase; letter-spacing: .4px; margin-top: 5px; }
.aps-sb-foot { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 14px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }

/* ── SECTION WRAPPER (timeline/stats/lineup) ── */
.aps-section { border: 1px solid #e5e7eb; border-radius: 12px; padding: 0; margin-bottom: 16px; overflow: hidden; font-family: -apple-system, sans-serif; }
.aps-section-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: #6b7280; padding: 10px 16px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }

/* ── TIMELINE ── */
.aps-tl-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #f3f4f6; }
.aps-tl-row:last-child { border-bottom: none; }
.aps-tl-min { font-size: 12px; font-weight: 600; color: #6b7280; min-width: 30px; padding-top: 1px; }
.aps-tl-icon { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; background: #f3f4f6; }
.aps-tl-goal, .aps-tl-penalty { background: #dcfce7; }
.aps-tl-yellowcard { background: #fef9c3; }
.aps-tl-redcard { background: #fee2e2; }
.aps-tl-sub { background: #dbeafe; }
.aps-tl-owngoal { background: #fee2e2; }
.aps-tl-info { flex: 1; }
.aps-tl-player { font-size: 13px; font-weight: 600; color: #111; }
.aps-tl-team { font-size: 11px; color: #9ca3af; display: block; }
.aps-tl-assist { font-size: 11px; color: #6b7280; display: block; }
.aps-tl-score { font-size: 13px; font-weight: 700; color: #1a73e8; white-space: nowrap; background: #e8f0fe; padding: 2px 8px; border-radius: 20px; margin-left: auto; }

/* ── STATISTIK ── */
.aps-stat-row { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.aps-stat-row:last-child { border-bottom: none; }
.aps-stat-hv, .aps-stat-av { font-weight: 600; min-width: 36px; color: #111; }
.aps-stat-hv { text-align: left; }
.aps-stat-av { text-align: right; }
.aps-stat-bar { flex: 1; height: 6px; background: #f3f4f6; border-radius: 3px; overflow: hidden; display: flex; }
.aps-stat-bh { height: 100%; background: #1a73e8; transition: width .5s ease; }
.aps-stat-ba { height: 100%; background: #ef4444; transition: width .5s ease; }
.aps-stat-label { font-size: 11px; color: #6b7280; text-align: center; min-width: 100px; white-space: nowrap; }

/* ── LINEUP ── */
.aps-lineup-header { display: flex; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.aps-lh-team { flex: 1; padding: 9px 16px; font-size: 13px; font-weight: 600; color: #111; }
.aps-lh-right { text-align: right; }
.aps-lineup-body { }
.aps-lineup-row { display: flex; border-bottom: 1px solid #f3f4f6; }
.aps-lineup-row:last-child { border-bottom: none; }
.aps-lp { flex: 1; padding: 8px 16px; font-size: 13px; display: flex; align-items: center; gap: 6px; color: #111; }
.aps-lp-away { flex-direction: row-reverse; text-align: right; }
.aps-lp-num { font-size: 11px; font-weight: 700; color: #9ca3af; min-width: 22px; height: 22px; background: #f3f4f6; border-radius: 4px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.aps-lp-sub { background: #f9fafb; color: #6b7280; font-size: 12px; }
.aps-lineup-subs-label { padding: 6px 16px; font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; background: #f3f4f6; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }

/* ── POSISI BADGE ── */
.aps-pos-badge { font-size: 10px; font-weight: 700; padding: 2px 5px; border-radius: 4px; flex-shrink: 0; }
.aps-pos-gk, .aps-pos-goalkeeper { background: #dbeafe; color: #1e40af; }
.aps-pos-def, .aps-pos-defender { background: #dcfce7; color: #166534; }
.aps-pos-mid, .aps-pos-midfielder { background: #fef9c3; color: #854d0e; }
.aps-pos-fwd, .aps-pos-forward { background: #fee2e2; color: #991b1b; }

/* ── PEMAIN ── */
.aps-player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; padding: 14px; }
.aps-player-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 10px; text-align: center; background: #fafafa; transition: border-color .15s; }
.aps-player-card:hover { border-color: #93c5fd; }
.aps-player-img { width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 50%; overflow: hidden; background: #f3f4f6; }
.aps-player-img img { width: 100%; height: 100%; object-fit: cover; }
.aps-player-ph { width: 64px; height: 64px; border-radius: 50%; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 8px; }
.aps-player-num { font-size: 11px; font-weight: 700; color: #6b7280; margin-bottom: 4px; }
.aps-player-name { font-size: 13px; font-weight: 600; color: #111; margin-bottom: 6px; }
.aps-player-meta { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.aps-player-nat { font-size: 11px; color: #6b7280; }

/* ── STADION ── */
.aps-venue-img { overflow: hidden; max-height: 200px; }
.aps-venue-img img { width: 100%; height: 200px; object-fit: cover; display: block; }
.aps-venue-body { padding: 16px; }
.aps-venue-name { font-size: 17px; font-weight: 700; color: #111; margin: 0 0 12px; }
.aps-venue-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.aps-venue-stat { background: #f9fafb; border-radius: 8px; padding: 10px 12px; border: 1px solid #f3f4f6; }
.aps-venue-stat strong { display: block; font-size: 18px; font-weight: 700; color: #111; }
.aps-venue-stat span { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .4px; }
.aps-venue-desc { font-size: 13px; color: #374151; line-height: 1.6; margin: 0; }

/* ── RELATED LINKS ── */
.aps-related-links { background: #eff6ff; border-left: 3px solid #3b82f6; padding: 10px 14px; margin-top: 20px; font-size: 13px; border-radius: 0 6px 6px 0; }
.aps-related-links a { color: #1d4ed8; text-decoration: none; }
.aps-related-links a:hover { text-decoration: underline; }

/* ── SOURCE / FOOTER ── */
.aps-source { font-size: 11px; color: #9ca3af; border-top: 1px solid #f3f4f6; padding-top: 10px; margin-top: 24px; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .aps-sb-score { font-size: 40px; }
    .aps-player-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .aps-venue-stats { grid-template-columns: 1fr 1fr; }
    .aps-stat-label { min-width: 70px; font-size: 10px; }
    .aps-fix-team span { font-size: 12px; }
    .aps-table { font-size: 12px; }
}
