/* ============================================================
   WP Football — Live Matches Shortcode
   ============================================================ */

/* ── Обгортка ─────────────────────────────────────────────── */
.wf-live-wrap {
    font-family: inherit;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

/* ── Навігація по датах ───────────────────────────────────── */
.wf-date-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px;
    margin-bottom: 16px;
    width: fit-content;
    position: relative;
}

.wf-date-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #555;
    text-decoration: none;
    border-radius: 3px;
    transition: background .15s, color .15s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
}

.wf-date-nav__btn:hover {
    background: #e8e8e8;
    color: #222;
    text-decoration: none;
}

.wf-date-nav__btn--active {
    background: #fff;
    color: #f47900;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

.wf-date-nav__btn--active:hover {
    background: #fff;
    color: #f47900;
}

.wf-date-nav__calendar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    transition: background .15s, color .15s;
    margin-left: 4px;
    flex-shrink: 0;
}

.wf-date-nav__calendar-btn:hover {
    background: #e8e8e8;
    color: #444;
}

.wf-date-nav__calendar-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ── Календар popup ───────────────────────────────────────── */
.wf-calendar-popup {
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 20px;
    display: none;
    width: max-content;
    max-width: 98vw;
}

.wf-calendar-popup.wf-calendar-popup--open {
    display: block;
}

.wf-calendar-months {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.wf-calendar-month {
    min-width: 196px;
}

.wf-calendar-month__title {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #2b4c7e;
    margin-bottom: 10px;
    letter-spacing: .3px;
}

.wf-calendar-month__head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.wf-calendar-month__head span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    padding: 2px 0;
}

.wf-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.wf-cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 12px;
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: background .12s, color .12s;
    user-select: none;
    text-decoration: none;
}

.wf-cal-day:hover {
    background: #f5f5f5;
    text-decoration: none;
    color: #333;
}

.wf-cal-day--empty {
    cursor: default;
    pointer-events: none;
}

.wf-cal-day--today {
    background: #f47900;
    color: #fff !important;
    font-weight: 700;
}

.wf-cal-day--today:hover {
    background: #e06700;
}

.wf-cal-day--active {
    background: #fff3e6;
    color: #f47900;
    font-weight: 700;
    outline: 2px solid #f47900;
    outline-offset: -2px;
}

.wf-cal-day--has-data::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #f47900;
}

.wf-cal-day--today::after,
.wf-cal-day--active::after {
    background: #fff;
}

/* ── Стан завантаження ────────────────────────────────────── */
.wf-matches-loading {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 14px;
}

.wf-matches-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f47900;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wf-spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes wf-spin {
    to { transform: rotate(360deg); }
}

/* ── Секція турніру ───────────────────────────────────────── */
.wf-tournament-block {
    margin-bottom: 20px;
}

.wf-tournament-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-left: 3px solid #f47900;
    border-radius: 2px;
    margin-bottom: 2px;
}

.wf-tournament-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.wf-tournament-name {
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.wf-tournament-country {
    font-size: 11px;
    color: #999;
    margin-left: auto;
}

/* ── Рядок матчу (розширює section-item) ─────────────────── */
.wf-match-row {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid #f0f0f0;
    gap: 8px;
    background: #fff;
    transition: background .12s;
    text-decoration: none;
    color: inherit;
}

.wf-match-row:hover {
    background: #fffaf4;
}

.wf-match-row--live {
    background: #fff8f0;
}

/* Час */
.wf-match-time {
    width: 48px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.wf-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e00;
    flex-shrink: 0;
    animation: wf-blink 1.2s ease-in-out infinite;
}

@keyframes wf-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .2; }
}

/* Команди */
.wf-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: #222;
    overflow: hidden;
}

.wf-team--host {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.wf-team img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.wf-team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-team--winning span {
    font-weight: 700;
    color: #111;
}

/* Рахунок */
.wf-score {
    width: 58px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    flex-shrink: 0;
}

.wf-score-sep {
    color: #aaa;
    margin: 0 2px;
}

.wf-score-dash {
    color: #bbb;
    font-size: 18px;
    font-weight: 300;
}

/* Статус */
.wf-match-state {
    font-size: 10px;
    font-weight: 700;
    color: #e00;
    text-transform: uppercase;
    width: 38px;
    text-align: center;
    flex-shrink: 0;
}

.wf-match-state--finished { color: #888; }
.wf-match-state--postponed { color: #f47900; }
.wf-match-state--plan { color: #bbb; }

/* Трансляція */
.wf-stream-icon {
    font-size: 11px;
    color: #f47900;
    flex-shrink: 0;
    title: 'Є трансляція';
}

/* Посилання */
.wf-match-link {
    font-size: 12px;
    color: #bbb;
    text-decoration: none;
    flex-shrink: 0;
    transition: color .12s;
}

.wf-match-link:hover {
    color: #f47900;
}

/* ── Порожній стан ────────────────────────────────────────── */
.wf-no-matches {
    text-align: center;
    padding: 32px 16px;
    color: #aaa;
    font-size: 14px;
}

/* ── Адаптив ──────────────────────────────────────────────── */

/* Горизонтальний скрол для рядків матчів */
.wf-tournament-block {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wf-match-row {
    min-width: 380px;
}

@media (max-width: 600px) {
    .wf-calendar-months {
        gap: 12px;
    }
    .wf-calendar-month {
        min-width: 160px;
    }
    .wf-date-nav__btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    .wf-score {
        width: 50px;
    }
}

@media (max-width: 480px) {
    .wf-calendar-months {
        flex-direction: column;
    }
}
