/*
Theme Name: Shot4K
Theme URI: https://shot4k.site
Author: ShehabAI Technical
Description: قالب مستقل لموقع Shot4K | شوت فوركي — هوية حمراء/سوداء، RTL، تصميم رياضي احترافي، هاتف أول.
Version: 0.1.0 (مرحلة أولى)
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.3
License: GNU General Public License v2 or later
Text Domain: shot4k
Tags: sports, custom-colors, rtl-language-support, responsive
*/

/* ============ نظام الألوان (هوية Shot4K) ============ */
:root {
    /* الأحمر (أساسي) */
    --c-primary:        #E11D2E;
    --c-primary-dark:   #B00F1E;
    --c-primary-soft:   #FFE5E8;
    --c-primary-glow:   rgba(225, 29, 46, 0.35);

    /* الأسود / الداكن */
    --c-dark:           #0A0E14;
    --c-dark-2:         #141A24;
    --c-dark-3:         #1A212C;
    --c-black:          #000000;

    /* السطوح والنص */
    --c-surface:        #FFFFFF;
    --c-text:           #F5F7FA;
    --c-text-muted:     #9AA3B2;
    --c-border:         rgba(255, 255, 255, 0.08);

    /* حالة */
    --c-success:        #22C55E;
    --c-warning:        #F59E0B;
    --c-live:           #EF4444;

    /* الخطوط */
    --font-rtl:  'Changa', 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
    --font-ltr:  'Oswald', 'Changa', sans-serif;
    --fs-base: 14px;
    --fs-sm: 12px;
    --fs-md: 16px;
    --fs-lg: 20px;
    --fs-title: 26px;
    --fs-match-time: 18px;
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* الأحجام والمسافات */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --card-padding: 16px;
    --gap: 16px;
    --gap-sm: 8px;
    --container-max: 1200px;
    --header-h: 64px;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-btn: 0 4px 14px var(--c-primary-glow);

    /* انتقال */
    --tr: 0.2s ease;
}

/* عناوين مجموعات الرياضات (StreamCenter) */
.sport-group {
    margin: 22px 0 18px;
    background: linear-gradient(180deg, #171b27, #11141d);
    border: 1px solid #232b3a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.sport-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #171b27;
    border-bottom: 1px solid #232b3a;
    font-weight: 700;
    font-size: 14px;
}
.sport-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #a6e22e;
    flex: 0 0 8px;
    box-shadow: 0 0 8px rgba(166,226,46,.6);
}
.sport-name { color: #e6e9ef; }
.sport-cnt {
    margin-right: auto;
    font-size: 12px;
    color: #93a0b5;
    background: #0b0e14;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* مبدّل البث (Stream Switcher) */
.stream-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.stream-opt {
  background: var(--c-dark-2, #11141d);
  border: 1px solid var(--c-border, #262b3a);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.stream-opt:hover { border-color: #a6e22e; }
.stream-opt.is-active {
  background: #a6e22e;
  border-color: #a6e22e;
  color: #0b0e14;
}


/* تنسيق البطاقات بنمط التصميم 2 (يتم في أقسام الرياضات) */
.sport-group .match-card {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid #232b3a;
}
.sport-group .match-card:last-child {
    border-bottom: none;
}
.sport-group .match-main {
    padding: 16px 18px;
    gap: 10px;
}
.sport-group .team-logo {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    border: 1px solid #232b3a;
    background: #0b0e14;
    font-size: 18px;
}
.sport-group .team-logo-img { width: 34px; height: 34px; }
.sport-group .team-name {
    font-size: 15px;
    font-weight: 600;
}
.sport-group .match-score {
    font-family: Consolas, monospace;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}
.sport-group .match-time {
    font-size: 16px;
}
.sport-group .status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    margin-top: 6px;
}
.sport-group .match-footer {
    background: rgba(0,0,0,0.2);
}
.sport-group .match-actions .watch-btn {
    background: #a6e22e;
    color: #0b0e14;
    padding: 6px 16px;
    font-weight: 700;
    transition: transform .15s ease;
}
.sport-group .match-actions .watch-btn:hover { transform: translateY(-1px); }
.sport-group .match-actions .watch-btn:not(.watch-live) {
    background: #0b0e14;
    color: #e6e9ef;
    border: 1px solid #232b3a;
}

/* وقت المباراة بجانب البطولة (الشريط السفلي) */
.match-kickoff {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    margin-left: 8px;
}
.mk-kick-date {
    font-size: 11px;
    color: #a6e22e;
    font-family: Consolas, monospace;
    background: rgba(166,226,46,0.08);
    border: 1px solid rgba(166,226,46,0.2);
    padding: 2px 9px;
    border-radius: 999px;
}
.mk-kick-time {
    font-size: 12px;
    color: #fff;
    font-family: Consolas, monospace;
    font-weight: 700;
    background: #0b0e14;
    border: 1px solid #232b3a;
    padding: 2px 9px;
    border-radius: 999px;
}

/* مؤقت تنازلي حتى بداية المباراة */
.match-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: ltr;
    background: rgba(166,226,46,0.06);
    border: 1px solid rgba(166,226,46,0.18);
    border-radius: 12px;
    padding: 6px 10px;
    margin-bottom: 4px;
}
.cd-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}
.cd-unit b {
    font-family: Consolas, monospace;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    min-width: 26px;
    text-align: center;
}
.cd-unit i {
    font-style: normal;
    font-size: 9px;
    color: #93a0b5;
    margin-top: 2px;
}
.cd-sep {
    font-family: Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    color: #a6e22e;
    opacity: .7;
    padding-bottom: 14px;
}

/* شارة مباشر تظهر عند انطلاق المباراة (بدل المؤقت) */
.cd-live {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: #e11d2e;
    padding: 4px 14px;
    border-radius: 999px;
    letter-spacing: .5px;
}
.cd-live::before {
    content: "";
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #fff;
    margin-right: 6px;
    animation: cdLivePulse 1.2s infinite;
}
@keyframes cdLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* البطاقة قابلة للنقر بالكامل (تنقل لصفحة البث) */
.match-card[data-permalink] {
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.match-card[data-permalink]:hover {
    transform: translateY(-2px);
    border-color: rgba(166,226,46,0.45);
}
.match-card[data-permalink]:focus-visible {
    outline: 2px solid #a6e22e;
    outline-offset: 2px;
}
.match-card a, .match-card button { cursor: pointer; }

/* قسم البث غير المتاح */
.broadcast-panel--unavailable {
    border-color: rgba(255,255,255,0.12);
}
.broadcast-panel--unavailable .status-neutral {
    color: #93a0b5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.empty-state--sm { padding: 20px 0; }
.empty-state--sm p { color: #93a0b5; font-size: 14px; }
