/* Preview UI and the RF table adapter; row styles come from frontend.css. */
.rfp-page {
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    background: #000;
    color: #fff;
    font: 14px/1.6 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.rfp-shell {
    box-sizing: border-box;
    width: calc(100% - 30px);
    max-width: 1150px;
    margin: 30px auto;
}

.rfp-embed {
    --rfp-muted: #b9c8cf;
    --rfp-live: #39ff14;
}

@media (max-width: 767px) {
    /* JNews uses 10px container gutters at this breakpoint. */
    body.rfp-theme-page .jeg_singlepage > .container > .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    body.rfp-theme-page .jeg_navbar_mobile .jeg_search_form {
        left: -10px !important;
        right: -10px !important;
    }
    body.rfp-theme-page .jeg_singlepage .vc_column_container,
    body.rfp-theme-page .jeg_singlepage .jeg_wrapper {
        min-width: 0;
    }
    #rfp-preview {
        max-width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 767px) {
    #rfp-preview .canli-skor-desktop-table .takim-adi {
        max-width: 16ch;
    }
}

.rfp-private-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 5px;
}

#rfp-preview .rfp-private-row h2 {
    margin: 0;
    padding-left: 8px;
    border-left: 3px solid #cf2e2e;
    color: #fff;
    font: 700 14px/1.2 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.rfp-private {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid #2b4a56;
    border-radius: 16px;
    color: #b9c8cf;
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
}

.rfp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 5px 14px;
    padding: 5px 6px 8px;
    border-bottom: 1px solid hsla(180, 5%, 79%, .25);
    color: #b9c8cf;
    font-size: 11px;
    line-height: 1.5;
}

.rfp-date {
    color: #b9c8cf;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rfp-update {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b9c8cf;
}

.rfp-update::before {
    content: '';
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border-radius: 50%;
    background: #b9c8cf;
}

.rfp-update[data-state='ready']::before {
    background: #39ff14;
}

.rfp-update[data-state='error'] {
    color: #efbd9f;
}

.rfp-update[data-state='error']::before {
    background: #efbd9f;
}

.rfp-loading,
.rfp-error {
    padding: 28px 16px;
    background: #010a0f;
    color: #a4b0be;
    text-align: center;
    font-size: 14px;
    line-height: 1.6;
}

.rfp-loading p,
.rfp-error p {
    margin: 0 !important;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.rfp-retry {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 14px 0 0;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font: 600 14px/1.4 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    transition: background-color .2s ease;
}

.rfp-retry:hover {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

.rfp-retry:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.rfp-retry:disabled {
    opacity: .6;
    cursor: wait;
}

/* Our outer container only; no selector targets provider descendants. */
.rfp-widget {
    width: 100%;
    min-width: 0;
    background: #010a0f;
}

/* Retain the provider's update tree. The visible table uses the site's actual
   desktop/mobile markup; the provider source remains the fallback until ready. */
.rfp-widget.rfp-source-adapted {
    position: absolute;
    left: -100000px;
    width: 830px;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

.rfp-table-view .rf-match-row {
    height: 43.5px;
}

.rfp-table-view .canli-skor-desktop-table {
    margin: 0;
}

.rfp-table-view .league-name-link {
    cursor: default;
}

.rfp-table-view .rf-mobile-matches {
    margin: 0;
}

.rfp-table-view[hidden] {
    display: none !important;
}

@media (min-width: 768px) and (max-width: 991px) {
    .rfp-table-view .rf-match-row { height: 40px; }
}

.rfp-provider {
    margin-top: 8px;
    padding: 8px 6px 2px;
    border-top: 1px solid hsla(180, 5%, 79%, .25);
    color: #b9c8cf;
    font-size: 11px;
    line-height: 1.7;
}

.rfp-provider p {
    margin: 0 !important;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.rfp-provider small {
    font-size: 10px;
}

.rfp-provider a {
    color: #b9c8cf;
    text-decoration: underline;
}

.rfp-provider a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.rfp-loading[hidden],
.rfp-error[hidden],
.rfp-update[hidden],
.rfp-widget[hidden] {
    display: none !important;
}

.rfp-denied {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: min(620px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 48px 0;
}

.rfp-denied h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
}

.rfp-denied p {
    margin: 0;
    color: #b9c8cf;
    font-size: 15px;
    line-height: 1.8;
}

@media (max-width: 600px) {
    .rfp-private-row { padding: 5px; }
    .rfp-toolbar { gap: 5px 12px; padding: 5px 5px 8px; font-size: 10px; }
    .rfp-provider { padding-left: 5px; padding-right: 5px; font-size: 10px; }
    .rfp-provider small { font-size: 9px; }
    .rfp-denied h1 { font-size: 30px; }
}

@media (max-width: 360px) {
    .rfp-private { font-size: 10px; }
    .rfp-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .rfp-retry { transition: none; }
}

/* Match rows open our native dialog; provider update markup stays separate. */
.rfp-table-view .rf-match-row[role='button'],
.rfp-table-view .rf-mobile-match-row[role='button'] {
    cursor: pointer;
}

.rfp-table-view .rf-match-row[role='button']:focus-visible,
.rfp-table-view .rf-mobile-match-row[role='button']:focus-visible {
    outline: 2px solid #39ff14;
    outline-offset: -2px;
}

body.rfp-match-open { overflow: hidden; }

/* Scoped copies of the normal mac-detay layout; the original page is unchanged. */
#rfp-preview .rfp-match-dialog.rf-match-detail-page {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: min(900px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    min-width: 0;
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    border: 1px solid #1f2a36;
    border-radius: 10px;
    background: #0c1116;
    color: #e6e6e6;
    font: 400 14px/1.5 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: left;
    overflow: hidden;
    overscroll-behavior: contain;
    color-scheme: dark;
    box-shadow: 0 16px 64px rgba(0, 0, 0, .5);
}
#rfp-preview .rfp-match-dialog[open] { display: flex; flex-direction: column; }
#rfp-preview .rfp-match-dialog:not([open]) { display: none; }
#rfp-preview .rfp-match-dialog::backdrop { background: rgba(0, 0, 0, .78); }

#rfp-preview .rfp-match-dialog .rf-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 12px;
    min-width: 0;
    padding: 12px 20px;
    background: #121822;
    border-bottom: 1px solid #1f2a36;
}
#rfp-preview .rfp-match-dialog .rf-league-meta { display: flex; align-items: center; min-width: 0; gap: 10px; }
#rfp-preview .rfp-match-dialog .rf-league-name { color: #e6e6e6; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
#rfp-preview .rfp-match-dialog .rf-teams {
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 16px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 20px 0;
}
#rfp-preview .rfp-match-dialog .rf-team {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 0;
    padding: 50px 0 0;
    color: #e6e6e6;
    text-align: center;
}
#rfp-preview .rfp-match-dialog .rf-team-logo-container { display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 56px; }
#rfp-preview .rfp-match-dialog .rf-team .logo {
    display: block;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    max-width: 56px;
    margin: 0;
    border-radius: 50%;
    background: #1b2430;
    object-fit: contain;
}
#rfp-preview .rfp-match-dialog .rf-team .name {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}
#rfp-preview .rfp-match-dialog .rf-score-box { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 8px; min-width: 0; max-width: 38%; }
#rfp-preview .rfp-match-dialog .rf-score-box.rfp-match-no-date { padding-top: 50px; }
#rfp-preview .rfp-match-dialog .rf-match-datetime { padding: 12px 0; color: #e6e6e6; font-size: 15px; line-height: 1.5; text-align: center; }
#rfp-preview .rfp-match-dialog .rf-score-container {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    font-variant-numeric: tabular-nums;
}
#rfp-preview .rfp-match-dialog .rf-score-num,
#rfp-preview .rfp-match-dialog .rf-score-sep { margin: 0; padding: 0; color: #ff005a; font-size: 43px; font-weight: 800; line-height: 1.2; }
#rfp-preview .rfp-match-dialog .rf-home-score { text-align: right; }
#rfp-preview .rfp-match-dialog .rf-away-score { text-align: left; }
#rfp-preview .rfp-match-dialog .rf-match-status {
    min-width: 0;
    margin: 10px 0 0;
    padding: 0;
    color: #a4b0be;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}
#rfp-preview .rfp-match-dialog .rfp-match-summary[data-state='live'] .rf-score-num,
#rfp-preview .rfp-match-dialog .rfp-match-summary[data-state='live'] .rf-score-sep { color: #39ff14; }
#rfp-preview .rfp-match-dialog .rfp-match-summary[data-state='live'] .rf-match-status { color: #39ff14; font-size: 22.5px; }
#rfp-preview .rfp-match-dialog .rf-match-status::after { content: none; }

#rfp-preview .rfp-match-dialog .rfp-match-view {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    margin: 20px 0 0;
    padding: 14px 20px 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #1f2a36 #0c1116;
    -webkit-overflow-scrolling: touch;
}
#rfp-preview .rfp-match-dialog .rfp-match-view:focus-visible { outline: 2px solid #39ff14; outline-offset: -2px; }
#rfp-preview .rfp-match-dialog .rfp-match-detail-close,
#rfp-preview .rfp-match-dialog .rfp-detail-retry {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid #1f2a36;
    border-radius: 5px;
    background: transparent;
    color: #a4b0be;
    font: 600 12px/1.5 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    pointer-events: auto;
}
#rfp-preview .rfp-match-dialog .rfp-match-detail-close { width: 44px; min-width: 44px; padding: 8px; font-size: 22px; line-height: 1; }
#rfp-preview .rfp-match-dialog .rfp-detail-retry { margin-top: 12px; }
#rfp-preview .rfp-match-dialog .rfp-match-detail-close:hover,
#rfp-preview .rfp-match-dialog .rfp-detail-retry:hover { background: #1f2a36; color: #e6e6e6; }
#rfp-preview .rfp-match-dialog .rfp-match-detail-close:focus-visible,
#rfp-preview .rfp-match-dialog .rfp-detail-retry:focus-visible { outline: 2px solid #39ff14; outline-offset: 3px; }
#rfp-preview .rfp-match-dialog .rfp-match-detail-message { padding: 28px 12px; color: #a4b0be; font-size: 13px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
#rfp-preview .rfp-match-dialog .rfp-match-detail-message p { margin: 0; color: inherit; font-size: inherit; line-height: inherit; }

#rfp-preview .rfp-match-dialog .rf-half { margin: 0; padding: 0; border: 1px solid #1f2a36; border-radius: 8px; background: #0c1116; overflow: hidden; }
#rfp-preview .rfp-match-dialog .rf-match-detail-events { margin: 0; padding: 0 16px; }
#rfp-preview .rfp-match-dialog .rfp-match-source-note { margin: 0; padding: 12px 16px; border-bottom: 1px dashed #1f2a36; color: #a4b0be; font-size: 13px; overflow-wrap: anywhere; }
#rfp-preview .rfp-match-dialog .rf-match-detail-event-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px dashed #1f2a36;
    color: #a4b0be;
    font-size: 13px;
    line-height: 1.5;
}
#rfp-preview .rfp-match-dialog .rf-match-detail-event-detail:last-child { border-bottom: 0; }
#rfp-preview .rfp-match-dialog .side-home { justify-content: flex-start; }
#rfp-preview .rfp-match-dialog .side-away { justify-content: flex-end; }
#rfp-preview .rfp-match-dialog .side-center { justify-content: center; }
#rfp-preview .rfp-match-dialog .rf-event-minute { align-self: center; flex-shrink: 0; min-width: 0; color: #a4b0be; font-size: inherit; font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
#rfp-preview .rfp-match-dialog .rf-event-icon { display: inline-flex; align-self: center; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; min-width: 16px; line-height: 1; }
#rfp-preview .rfp-match-dialog .rf-event-icon img { display: block; width: 16px; height: 16px; max-width: 100%; margin: 0; object-fit: contain; }
#rfp-preview .rfp-match-dialog .rf-event-player { min-width: 0; color: #a4b0be; text-align: left; white-space: normal; overflow-wrap: anywhere; }
#rfp-preview .rfp-match-dialog .side-away .rf-event-player { text-align: right; }
#rfp-preview .rfp-match-dialog .side-center .rf-event-player { text-align: center; }
#rfp-preview .rfp-match-dialog .rf-sub { display: block; max-width: 100%; margin: 2px 0 0; color: #a4b0be; font-size: inherit; font-style: normal; line-height: 1.35; }
#rfp-preview .rfp-match-dialog .rf-event-score { flex-shrink: 0; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #ff005a; font-size: inherit; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#rfp-preview .rfp-match-dialog > .rfp-provider { flex: 0 0 auto; min-width: 0; margin: 0; padding: 10px 20px; border-top: 1px solid #1f2a36; background: #121822; color: #a4b0be; overflow-wrap: anywhere; }
#rfp-preview .rfp-match-dialog > .rfp-provider a { color: #a4b0be; text-decoration: underline; }
#rfp-preview .rfp-match-dialog [hidden] { display: none !important; }

@media (max-width: 768px) {
    #rfp-preview .rfp-match-dialog.rf-match-detail-page { border-radius: 8px; }
    #rfp-preview .rfp-match-dialog .rf-detail-header { gap: 12px; padding: 10px 16px; }
    #rfp-preview .rfp-match-dialog .rf-league-name { font-size: 13px; }
    #rfp-preview .rfp-match-dialog .rf-teams { gap: 12px; padding: 16px 16px 0; }
    #rfp-preview .rfp-match-dialog .rf-team .logo { width: 48px; max-width: 48px; height: 48px; }
    #rfp-preview .rfp-match-dialog .rf-team-logo-container { min-height: 48px; }
    #rfp-preview .rfp-match-dialog .rf-team .name { font-size: 11px; }
    #rfp-preview .rfp-match-dialog .rf-match-datetime { font-size: 13px; }
    #rfp-preview .rfp-match-dialog .rf-score-num,
    #rfp-preview .rfp-match-dialog .rf-score-sep { font-size: 35px; }
    #rfp-preview .rfp-match-dialog .rf-match-status { font-size: 11px; }
    #rfp-preview .rfp-match-dialog .rfp-match-summary[data-state='live'] .rf-match-status { font-size: 22px; }
    #rfp-preview .rfp-match-dialog .rfp-match-view { margin-top: 16px; padding: 10px 16px 16px; }
    #rfp-preview .rfp-match-dialog .rf-match-detail-events { padding: 0 8px; }
    #rfp-preview .rfp-match-dialog .rf-match-detail-event-detail { font-size: 12px; }
    #rfp-preview .rfp-match-dialog > .rfp-provider { padding: 8px 16px; font-size: 10px; }
}
@media (max-width: 380px) {
    #rfp-preview .rfp-match-dialog .rf-teams { gap: 8px; padding-right: 12px; padding-left: 12px; }
    #rfp-preview .rfp-match-dialog .rf-score-container { gap: 10px; }
    #rfp-preview .rfp-match-dialog .rf-score-box { max-width: 40%; }
    #rfp-preview .rfp-match-dialog .rf-match-datetime { font-size: 11px; }
    #rfp-preview .rfp-match-dialog .rf-score-num,
    #rfp-preview .rfp-match-dialog .rf-score-sep { font-size: 30px; }
    #rfp-preview .rfp-match-dialog .rf-team .logo { width: 42px; max-width: 42px; height: 42px; }
    #rfp-preview .rfp-match-dialog .rf-team-logo-container { min-height: 42px; }
}
@media (max-height: 500px) {
    #rfp-preview .rfp-match-dialog.rf-match-detail-page { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
    #rfp-preview .rfp-match-dialog .rf-detail-header { padding-top: 4px; padding-bottom: 4px; }
    #rfp-preview .rfp-match-dialog .rf-teams { padding-top: 6px; }
    #rfp-preview .rfp-match-dialog .rf-team { padding-top: 20px; }
    #rfp-preview .rfp-match-dialog .rf-score-box.rfp-match-no-date { padding-top: 20px; }
    #rfp-preview .rfp-match-dialog .rf-team .logo { width: 32px; max-width: 32px; height: 32px; }
    #rfp-preview .rfp-match-dialog .rf-team-logo-container { min-height: 32px; }
    #rfp-preview .rfp-match-dialog .rf-match-datetime { padding: 0; }
    #rfp-preview .rfp-match-dialog .rf-score-box { gap: 4px; }
    #rfp-preview .rfp-match-dialog .rf-score-num,
    #rfp-preview .rfp-match-dialog .rf-score-sep { font-size: 28px; }
    #rfp-preview .rfp-match-dialog .rf-match-status { margin-top: 0; }
    #rfp-preview .rfp-match-dialog .rfp-match-view { margin-top: 6px; padding-top: 6px; }
}

@media (max-width: 600px) {
    /* Let the team's column use the space left by the minute and score. */
    #rfp-preview .canli-skor-mobile-table {
        table-layout: fixed;
    }
    #rfp-preview .rf-mobile-team {
        width: auto !important;
    }
    #rfp-preview .rf-mobile-team .takim-adi {
        display: inline-block;
        max-width: 100%;
    }
    #rfp-preview .rf-mobile-team:has(.rf-redcard) .takim-adi {
        max-width: calc(100% - 28px);
    }
    #rfp-preview .rf-mobile-minute {
        width: 66px;
        min-width: 0;
        max-width: 66px;
    }
    /* Mobile status labels fit the narrower world-score column. Live minutes
       and scheduled times continue to use the shared scoreboard typography. */
    #rfp-preview .rf-mobile-minute.status-finished,
    #rfp-preview .rf-mobile-minute.status-halftime {
        font-size: 12px !important;
    }
    #rfp-preview .rf-mobile-score {
        width: 36px !important;
    }
    .rfp-table-view .canli-skor-mobile-table tr.rfp-mobile-match-first {
        border-bottom: 1px solid hsla(180, 5%, 79%, .25) !important;
    }
    .rfp-table-view .canli-skor-mobile-table tr.rfp-mobile-match-last {
        border-bottom: 10px solid #001e28 !important;
    }
}
