/* ═══════════════════════════════════════════════════════════════
   Wrestling Results Plugin — Ticker & Sidebar Styles
   Designed to match We Are Wrestling (WAW) theme exactly.
   Uses the same CSS custom properties, fonts, and class patterns.
═══════════════════════════════════════════════════════════════ */

/* ── WAW Theme token fallbacks (in case plugin loads before theme) ─── */
:root {
    --wr-pink:       var(--pink,      #e8006a);
    --wr-pink-dark:  var(--pink-dark, #b8004f);
    --wr-pink-glow:  var(--pink-glow, rgba(232,0,106,0.18));
    --wr-bg:         var(--bg,        #0a0a0a);
    --wr-bg2:        var(--bg2,       #111111);
    --wr-bg3:        var(--bg3,       #1a1a1a);
    --wr-border:     var(--border,    #2a2a2a);
    --wr-text:       var(--text,      #f0f0f0);
    --wr-muted:      var(--muted,     #888888);
    --wr-font-head:  var(--font-head, 'Barlow Condensed', 'Impact', sans-serif);
    --wr-font-body:  var(--font-body, 'Inter', 'Helvetica Neue', sans-serif);
    --wr-radius:     var(--radius,    4px);
    --wr-transition: var(--transition, 0.2s ease);
}

/* ══════════════════════════════════════════════════════════════
   RESULTS TICKER — matches .waw-ticker exactly
══════════════════════════════════════════════════════════════ */

#wr-top-ticker {
    /* Mirror .waw-ticker */
    background: var(--wr-bg2);
    border-bottom: 1px solid var(--wr-border);
    height: 38px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 100;
    width: 100%;
    font-family: var(--wr-font-body);
    font-size: 13px;
    color: var(--wr-text);
}

/* Label — matches .waw-ticker__label */
.wr-ticker-label {
    background: var(--wr-pink);
    color: #fff;
    font-family: var(--wr-font-head);
    font-weight: 800;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Pulsing dot — matches .waw-ticker__label .dot */
.wr-ticker-live-dot {
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: wr-pulse 1.4s infinite;
    flex-shrink: 0;
}

@keyframes wr-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Track wrapper — matches .waw-ticker__track */
.wr-ticker-track-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

/* Scrolling inner — matches .waw-ticker__inner */
.wr-ticker-track {
    display: flex;
    gap: 0;
    animation: wr-ticker-scroll 80s linear infinite;
    white-space: nowrap;
    align-items: center;
    height: 100%;
}

.wr-ticker-track.paused,
.wr-ticker-track:hover {
    animation-play-state: paused;
}

@keyframes wr-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Each event group inside the track — based on .waw-ticker__item */
.wr-ticker-event {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 32px 0 0;
    color: var(--wr-text);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--wr-transition);
}

.wr-ticker-event:hover {
    color: var(--wr-pink);
    text-decoration: none;
}

/* Promotion badge — pink dot replaced by coloured label */
.wr-ticker-event::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--wr-pink);
    border-radius: 50%;
    flex-shrink: 0;
}

.wr-ticker-promo-badge {
    font-family: var(--wr-font-head);
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    color: #fff;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Promotion badge colours — mirrors .waw-news-item__tag variants */
.wr-ticker-promo-badge.badge-wwe-raw,
.wr-ticker-promo-badge.badge-wwe-smackdown,
.wr-ticker-promo-badge.badge-wwe-nxt,
.wr-ticker-promo-badge.badge-wwe-ppv {
    background: rgba(232,0,106,0.2);
    color: var(--wr-pink);
    border: 1px solid rgba(232,0,106,0.35);
}

.wr-ticker-promo-badge.badge-aew {
    background: rgba(255,218,0,0.12);
    color: #ffd700;
    border: 1px solid rgba(255,218,0,0.3);
}

.wr-ticker-promo-badge.badge-njpw {
    background: rgba(255,60,60,0.1);
    color: #ff6060;
    border: 1px solid rgba(255,60,60,0.28);
}

.wr-ticker-promo-badge.badge-aaa {
    background: rgba(80,160,255,0.1);
    color: #5ab0ff;
    border: 1px solid rgba(80,160,255,0.28);
}

/* Date — matches .waw-ticker__time */
.wr-ticker-date {
    color: var(--wr-muted);
    font-size: 12px;
    flex-shrink: 0;
}

/* Match result text */
.wr-ticker-match {
    color: var(--wr-text);
}

.wr-ticker-sep {
    color: var(--wr-border);
    margin: 0 2px;
}

/* View all — matches .waw-ticker__view-all */
.wr-ticker-viewall {
    background: var(--wr-bg3);
    border-left: 1px solid var(--wr-border);
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    font-family: var(--wr-font-head);
    font-size: 12px;
    font-weight: 600;
    color: var(--wr-pink);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background var(--wr-transition), color var(--wr-transition);
    flex-shrink: 0;
    text-decoration: none;
}
.wr-ticker-viewall:hover {
    background: var(--wr-pink);
    color: #fff;
    text-decoration: none;
}

/* Pause button */
.wr-ticker-pause {
    background: transparent;
    border: none;
    color: var(--wr-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 0 10px;
    height: 100%;
    flex-shrink: 0;
    transition: color var(--wr-transition);
    line-height: 1;
    font-family: var(--wr-font-body);
}
.wr-ticker-pause:hover { color: var(--wr-pink); }

/* ══════════════════════════════════════════════════════════════
   RESULTS POST — content block inside single.php
   Matches .waw-page-content styles
══════════════════════════════════════════════════════════════ */

.wr-results-block {
    border-left: 4px solid var(--wr-pink);
    padding-left: 1.5em;
    margin-bottom: 24px;
}

.wr-results-block h2 {
    font-family: var(--wr-font-head);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: var(--wr-text, #f0f0f0);
    margin-bottom: 8px;
}

.wr-results-block ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
}

.wr-results-block ul li {
    position: relative;
    padding: 8px 0 8px 22px;
    border-bottom: 1px solid var(--wr-border);
    font-size: 15px;
    color: var(--wr-text, #f0f0f0);
    line-height: 1.5;
    font-family: var(--wr-font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wr-results-block ul li:last-child {
    border-bottom: none;
}

.wr-results-block ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--wr-pink);
    font-weight: 900;
    font-size: 16px;
}

/* Source line */
.wr-results-block .wr-source-line {
    font-size: 12px;
    color: var(--wr-muted);
    letter-spacing: 0.04em;
    margin-top: 12px;
}

.wr-results-block .wr-source-line a {
    color: var(--wr-pink);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR WIDGET — matches .waw-widget pattern
══════════════════════════════════════════════════════════════ */

/* The widget box itself uses .waw-widget when registered in sidebar */
.widget_wr_sidebar_results .wr-sidebar-widget {
    display: flex;
    flex-direction: column;
}

/* Each event card — mirrors .waw-sidebar-post */
.wr-sidebar-event {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--wr-border);
    transition: background var(--wr-transition);
}

.wr-sidebar-event:last-child {
    border-bottom: none;
}

.wr-sidebar-event:hover {
    background: rgba(255,255,255,0.02);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}

/* Event header row */
.wr-sidebar-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    text-decoration: none;
}

/* Promotion label — matches .waw-sidebar-post__label */
.wr-sidebar-promo {
    font-family: var(--wr-font-head);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 2px;
    line-height: 1.4;
}

.wr-sidebar-promo.promo-wwe-raw,
.wr-sidebar-promo.promo-wwe-smackdown,
.wr-sidebar-promo.promo-wwe-nxt,
.wr-sidebar-promo.promo-wwe-ppv {
    background: rgba(232,0,106,0.15);
    color: var(--wr-pink);
    border: 1px solid rgba(232,0,106,0.3);
}

.wr-sidebar-promo.promo-aew {
    background: rgba(255,218,0,0.1);
    color: #ffd700;
    border: 1px solid rgba(255,218,0,0.25);
}

.wr-sidebar-promo.promo-njpw {
    background: rgba(255,60,60,0.1);
    color: #ff6060;
    border: 1px solid rgba(255,60,60,0.25);
}

.wr-sidebar-promo.promo-aaa {
    background: rgba(80,160,255,0.1);
    color: #5ab0ff;
    border: 1px solid rgba(80,160,255,0.25);
}

/* Date — matches .waw-sidebar-post__date */
.wr-sidebar-date {
    font-size: 11px;
    color: var(--wr-muted);
    letter-spacing: 0.04em;
    font-family: var(--wr-font-body);
}

/* Match list — mirrors .waw-top-stories pattern */
.wr-sidebar-matches {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    display: flex;
    flex-direction: column;
}

.wr-sidebar-matches li {
    font-family: var(--wr-font-head);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wr-text);
    padding: 5px 0;
    border-bottom: 1px solid var(--wr-border);
    line-height: 1.25;
    transition: color var(--wr-transition);
    letter-spacing: 0.02em;
}

.wr-sidebar-matches li:last-child {
    border-bottom: none;
}

.wr-sidebar-event:hover .wr-sidebar-matches li {
    color: var(--wr-text);
}

/* Full results link — matches .waw-widget__footer a */
.wr-sidebar-more {
    font-family: var(--wr-font-head);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wr-pink);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap var(--wr-transition);
    text-decoration: none;
    margin-top: 4px;
}

.wr-sidebar-more:hover {
    gap: 10px;
    text-decoration: none;
    color: var(--wr-pink);
}

/* ══════════════════════════════════════════════════════════════
   ADMIN PAGE — matches WP admin style, WAW-accented
══════════════════════════════════════════════════════════════ */

.wr-admin-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e8006a;
}

.wr-admin-header h1 {
    margin: 0;
    color: #e8006a;
}

.wr-log-box {
    background: #0a0a0a;
    color: #f0f0f0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 16px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    width: 100%;
    height: 220px;
    resize: vertical;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — matches WAW breakpoints
══════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 768px) {
    #wr-top-ticker {
        height: 32px; /* matches waw-ticker mobile height */
    }

    .wr-ticker-date,
    .wr-ticker-sep {
        display: none;
    }

    .wr-ticker-label {
        padding: 0 10px;
        font-size: 10px;
    }

    .wr-ticker-viewall {
        padding: 0 10px;
        font-size: 11px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .wr-ticker-promo-badge {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   ANIMATION — matches WAW fadeInUp on list items
══════════════════════════════════════════════════════════════ */

.wr-sidebar-event {
    animation: wr-fadeInUp 0.3s ease backwards;
}

@keyframes wr-fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wr-sidebar-event:nth-child(1) { animation-delay: 0.05s; }
.wr-sidebar-event:nth-child(2) { animation-delay: 0.10s; }
.wr-sidebar-event:nth-child(3) { animation-delay: 0.15s; }
.wr-sidebar-event:nth-child(4) { animation-delay: 0.20s; }
.wr-sidebar-event:nth-child(5) { animation-delay: 0.25s; }
.wr-sidebar-event:nth-child(6) { animation-delay: 0.30s; }
