/* ═══════════════════════════════════════════════
   livescore-widget.css
   โครงสร้าง Layout เท่านั้น
   สี / ขนาด / typography → Elementor Controls
═══════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   Container หลัก
───────────────────────────────────────── */
.ls-widget-wrapper {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 6px;
    border-width: 1px;
    border-style: solid;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background-color  → wrapper_bg           (Elementor) */
    /* border-color      → wrapper_border_color (Elementor) */
    /* border-radius     → wrapper_radius       (Elementor) */
}

/* ─────────────────────────────────────────
   Header Bar
───────────────────────────────────────── */
.ls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: nowrap;
    /* background-color → header_bg      (Elementor) */
    /* padding          → header_padding (Elementor) */
}

/* ─────────────────────────────────────────
   Filter Dropdown
───────────────────────────────────────── */
.ls-filter-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ls-filter-select {
    appearance: none;
    -webkit-appearance: none;
    border-width: 1px;
    border-style: solid;
    padding: 5px 28px 5px 10px;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath fill='%23fff' d='M5 7L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px 7px;
    /* background-color → dropdown_bg           (Elementor) */
    /* color            → dropdown_color        (Elementor) */
    /* border-color     → dropdown_border_color (Elementor) */
    /* border-radius    → dropdown_border_radius(Elementor) */
    /* font-*           → dropdown_typography   (Elementor) */
}

.ls-live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    display: none;
    animation: ls-pulse 1.5s infinite;
    /* background-color → live_dot_color (Elementor) */
}
.ls-live-indicator.visible { display: inline-block; }

/* ─────────────────────────────────────────
   Calendar Button
───────────────────────────────────────── */
.ls-cal-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.ls-cal-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ls-cal-btn svg {
    display: block;
    /* width/height → calendar_icon_size  (Elementor) */
    /* fill         → calendar_icon_color (Elementor) */
}
.ls-date-hidden {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
}

/* ─────────────────────────────────────────
   Loading / Empty
───────────────────────────────────────── */
.ls-loading,
.ls-empty {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    /* color → loading_color (Elementor) */
}

/* ─────────────────────────────────────────
   แถวหัวข้อลีก
───────────────────────────────────────── */
.ls-league-group { /* wrapper สำหรับ toggle hidden */ }

.ls-league-row {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-top-width: 3px;
    border-top-style: solid;
    margin-top: 6px;
    /* background-color    → league_row_bg       (Elementor) */
    /* border-top-color    → league_accent_color (Elementor) */
    /* border-bottom-color → league_divider_color(Elementor) */
}
.ls-league-row:first-child { margin-top: 0; }

.ls-l-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}
.ls-l-flag {
    width: 18px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    margin-left: auto;
    flex-shrink: 0;
}
.ls-l-name {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* color → league_name_color (Elementor) */
}

/* ─────────────────────────────────────────
   กลุ่มแมตช์
───────────────────────────────────────── */
.ls-matches-group { margin-bottom: 4px; }

/* ─────────────────────────────────────────
   แถวแมตช์
───────────────────────────────────────── */
.ls-match-row {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    min-height: 44px;
    transition: background 0.2s ease;
    /* background-color       → match_bg            (Elementor) */
    /* border-bottom-color    → match_divider_color (Elementor) */
}
.ls-match-row:nth-child(even) {
    /* background-color → match_alt_bg (Elementor) */
}
.ls-match-row:hover {
    filter: brightness(1.03);
}

/* ─────────────────────────────────────────
   เวลา / สถานะ
───────────────────────────────────────── */
.ls-m-time {
    width: 40px;
    min-width: 40px;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    line-height: 1.3;
    /* color → time_color (Elementor) */
}
.ls-m-time.ft {
    font-size: 11px;
    /* color → ft_badge_color (Elementor) */
}
.ls-m-time.live {
    animation: ls-pulse 1.5s infinite;
    /* color → live_badge_color (Elementor) */
}

@keyframes ls-pulse { 0%,100%{opacity:1} 50%{opacity:.45} }

/* ─────────────────────────────────────────
   ชื่อทีม + โลโก้
───────────────────────────────────────── */
.ls-m-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    /* color / font-* → team_color / team_typography (Elementor) */
}
.ls-m-team span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.ls-m-team.home {
    justify-content: flex-end;
    text-align: right;
    flex-direction: row;
}
.ls-m-team.away {
    justify-content: flex-start;
    text-align: left;
    flex-direction: row;
}
.ls-m-team img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    /* width / height → logo_size (Elementor) */
}



/* ─────────────────────────────────────────
   กล่องสกอร์
───────────────────────────────────────── */
.ls-m-score {
    width: 80px;
    min-width: 80px;
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px;
    border-width: 1px;
    border-style: solid;
    margin: 0 10px;
    padding: 4px 0;
    font-size: 12px;
}

/* ─────────────────────────────────────────
   Filter: ซ่อน row ที่ไม่ตรง filter
───────────────────────────────────────── */
.ls-match-row[hidden],
.ls-league-group[hidden] { display: none !important; }

.ls-search-wrap {
    display: flex;
    margin-left: auto;
}

/* ─────────────────────────────────────────
   Responsive — มือถือ
───────────────────────────────────────── */
@media (max-width: 480px) {
    .ls-m-team span  { max-width: 80px; font-size: 12px; }
    .ls-m-team img   { width: 18px; height: 18px; }
    .ls-m-score      { width: 70px; font-size: 10px; margin: 0 6px; }
    .ls-m-time       { width: 34px; min-width: 34px; font-size: 11px; }
}