/**
 * Premium Match Card Widget CSS
 * Version: 2.0.0
 */

/* ===== Container ===== */
.ls-swiper-container {
    width: 100%;
    padding: 20px 10px;
    position: relative;
    overflow: hidden;
}

.ls-swiper {
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}

.ls-swiper .swiper-wrapper {
    display: flex !important;
    align-items: stretch !important;
    height: auto !important;
}

.ls-swiper .swiper-slide {
    height: auto !important;
    display: flex !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* ===== Card Base ===== */
.ls-match-card {
    display: flex;
    flex-direction: column;
    /* Background จัดการโดย Elementor Group_Control_Background */
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    min-height: 190px;
    position: relative;
    box-sizing: border-box;
}

.ls-match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* ===== League Header — 2 คอลัมน์ ===== */
.ls-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
    /* border-bottom-color / padding-bottom / margin-bottom
       ถูก override โดย Elementor controls */
}

/* ชื่อลีค — ซ้าย: ขยายเต็ม, truncate ถ้าล้น */
.ls-card-league-name {
    flex: 1 1 0;
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* color / typography ถูก override โดย Elementor */
}

/* วันที่ — ขวา: ไม่หด ไม่ขยาย */
.ls-card-match-date {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 500;
    color: #aaa;
    /* color / typography ถูก override โดย Elementor */
}

/* ===== Main Content ===== */
.ls-card-header + .ls-card-main {
    margin-top: 12px; /* gap ระหว่าง header กับโลโก้/ทีม */
}

.ls-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-height: 100px;
}

/* ===== Team Section ===== */
.ls-card-team {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

/* Logo — ขนาด Base (Elementor Responsive Control จะ override per breakpoint) */
.ls-card-team-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 8px;
}

/* Placeholder เมื่อไม่มีโลโก้ */
.ls-team-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    /* Background จัดการโดย Elementor placeholder_bg */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    margin-bottom: 8px;
}

.ls-card-team-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    /* color / typography / -webkit-line-clamp ถูก override โดย Elementor */
}

/* ===== Score Box ===== */
.ls-card-score-box {
    flex: 0 0 75px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ls-card-score-now {
    font-size: 28px;
    font-weight: 800;
    color: #e74c3c;
    line-height: 1;
    letter-spacing: 3px;
    /* color / typography ถูก override โดย Elementor */
}

.ls-card-time-ns {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    /* color / typography ถูก override โดย Elementor */
}

/* ===== Status Footer ===== */
.ls-card-footer {
    margin-top: 12px;
    padding: 7px 14px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    /* padding / radius ถูก override โดย Elementor */
}

/* Live — Background จัดการโดย Elementor status_live_bg */
.status-live {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    animation: ls-pulse-status 2s ease-in-out infinite;
}

.status-finished {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-upcoming {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* ===== Loading / Error Message ===== */
.ls-card-state-msg {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* ===== Animations ===== */
@keyframes ls-pulse-status {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.75; }
}

/* ===== RTL Support ===== */
.rtl .ls-card-league-name {
    letter-spacing: 0;
}

.rtl .ls-card-score-now {
    letter-spacing: 0;
}

/* ===== Print ===== */
@media print {
    .ls-match-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .status-live {
        background: #e74c3c !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}