/* ================================================================
   FootArabi Football Data — Styles natifs RTL
   ================================================================ */

.fad-widget {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
    max-width: 800px;
    margin: 1.5rem auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    background: #fff;
    font-size: 14px;
}

/* ── Header ── */
.fad-header {
    background: linear-gradient(135deg, #1a472a 0%, #2d6a4f 100%);
    color: #fff;
    padding: .75rem 1.2rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.fad-comp-name {
    font-size: 1rem;
    font-weight: 700;
    flex: 1;
}

.fad-season, .fad-subtitle {
    font-size: .8rem;
    opacity: .85;
    background: rgba(255,255,255,.15);
    padding: .2rem .5rem;
    border-radius: 20px;
}

/* ── Live dot ── */
.fad-live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ff3b3b;
    border-radius: 50%;
    animation: fad-pulse 1.2s infinite;
    flex-shrink: 0;
}

@keyframes fad-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.3); }
}

/* ── Table ── */
.fad-table-wrap {
    overflow-x: auto;
}

.fad-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.fad-table thead th {
    background: #f5f5f5;
    padding: .55rem .5rem;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    white-space: nowrap;
    color: #333;
}

.fad-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}

.fad-table tbody tr:hover {
    background: #f9f9f9;
}

.fad-table tbody td {
    padding: .5rem;
    text-align: center;
    vertical-align: middle;
}

/* ── Position & highlight rows ── */
.fad-pos {
    font-weight: 700;
    color: #555;
    width: 28px;
}

.fad-pts {
    font-size: 1rem;
    color: #1a472a;
}

.fad-row-cl { border-right: 4px solid #1565c0; }
.fad-row-el { border-right: 4px solid #e65100; }
.fad-row-rel { border-right: 4px solid #c62828; }

/* ── Crest / logo ── */
.fad-crest {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
    margin: 0 4px;
}

.fad-team-col {
    text-align: right !important;
    padding-right: .8rem !important;
}

/* ── Légende ── */
.fad-legend {
    display: flex;
    gap: 1rem;
    padding: .6rem 1rem;
    background: #fafafa;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.fad-leg {
    font-size: .75rem;
    padding: .15rem .4rem;
    border-radius: 3px;
    color: #fff;
    font-weight: 600;
}

.fad-cl  { background: #1565c0; }
.fad-el  { background: #e65100; }
.fad-rel { background: #c62828; }

/* ── Matchs ── */
.fad-match {
    border-bottom: 1px solid #f0f0f0;
    padding: .6rem 1rem;
}

.fad-match:last-child { border-bottom: none; }

.fad-match-meta {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: .4rem;
    font-size: .78rem;
    color: #666;
    flex-wrap: wrap;
}

.fad-matchday {
    font-weight: 600;
    color: #1a472a;
}

.fad-status-badge {
    background: #eee;
    padding: .1rem .4rem;
    border-radius: 10px;
    font-size: .73rem;
}

.fad-status-finished .fad-status-badge { background: #e8f5e9; color: #2e7d32; }
.fad-status-live     .fad-status-badge,
.fad-status-in_play  .fad-status-badge { background: #ffebee; color: #c62828; }
.fad-status-postponed .fad-status-badge { background: #fff3e0; color: #e65100; }

.fad-match-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.fad-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .3rem;
    font-weight: 600;
    font-size: .92rem;
}

.fad-home {
    justify-content: flex-end;
}

.fad-away {
    justify-content: flex-start;
}

.fad-team-name { line-height: 1.2; }

.fad-score {
    display: flex;
    align-items: center;
    gap: .3rem;
    min-width: 60px;
    justify-content: center;
}

.fad-score-home,
.fad-score-away {
    font-size: 1.3rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1;
}

.fad-score-sep {
    color: #999;
    font-size: 1.1rem;
}

.fad-score-vs {
    color: #aaa;
    font-size: .85rem;
    font-weight: 600;
}

/* ── Live badge ── */
.fad-live-badge {
    background: #ff3b3b;
    color: #fff;
    padding: .1rem .4rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: .78rem;
    animation: fad-pulse 1.2s infinite;
}

.fad-comp-badge {
    background: #1a472a;
    color: #fff;
    padding: .1rem .5rem;
    border-radius: 10px;
    font-size: .73rem;
    font-weight: 600;
}

/* ── Minute ── */
.fad-minute {
    font-weight: 700;
    color: #c62828;
}

/* ── Footer ── */
.fad-footer {
    padding: .4rem 1rem;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: .72rem;
    color: #999;
    text-align: center;
}

/* ── Erreur / vide ── */
.fad-error, .fad-empty {
    padding: 1.5rem;
    text-align: center;
    color: #c62828;
    font-size: .9rem;
}

.fad-empty { color: #666; }

/* ── Responsive ── */
@media (max-width: 500px) {
    .fad-team-name { font-size: .8rem; }
    .fad-score-home, .fad-score-away { font-size: 1.1rem; }
    .fad-table { font-size: .8rem; }
    .fad-crest { width: 18px; height: 18px; }
}
