@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

/* ============================================================
   ORDEN DE JUEGO - ESTILO FIP GOLD (widgets.sporteaser.app)
   Paleta tema "fipgold":
     oro           #fbd20f
     azul oscuro   #16253e
     tab inactivo  #f2f2f2 / texto #273238
     borde tarjeta #e6e6e6
     check ganador #009081
     WO / retiro   #c2130f
   ============================================================ */

:root {
    --ojf-gold: #fbd20f;
    --ojf-dark: #16253e;
    --ojf-tab-off-bg: #f2f2f2;
    --ojf-tab-off-text: #273238;
    --ojf-border: #e6e6e6;
    --ojf-court-bg: #f5f5f5;
    --ojf-check: #009081;
    --ojf-wo: #c2130f;
    --ojf-meta: gray;
    --ojf-col-width: 304px;
}

html, body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: Montserrat, sans-serif;
    color: var(--ojf-dark);
    -webkit-font-smoothing: antialiased;
}

.ojf-root,
.ojf-root *,
.ojf-root *::before,
.ojf-root *::after {
    box-sizing: border-box;
}

.ojf-root {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ---------- Cabecera del torneo (logos / titulo) ---------- */
.ojf-tourHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px 0 12px;
    flex-wrap: wrap;
}

    .ojf-tourHeader img {
        max-height: 60px;
        width: auto;
    }

/* Logo + botones LIVE / ORDER OF PLAY */
.ojf-tourBrand {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ojf-modeStrip {
    display: flex;
    gap: 6px;
}

.ojf-mode {
    display: inline-block;
    height: 34px;
    line-height: 34px;
    padding: 0 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    background: var(--ojf-tab-off-bg);
    color: var(--ojf-tab-off-text);
}

    .ojf-mode:hover,
    .ojf-mode:focus {
        text-decoration: none;
        color: var(--ojf-tab-off-text);
    }

    .ojf-mode.is-active,
    .ojf-mode.is-active:hover,
    .ojf-mode.is-active:focus {
        background: var(--ojf-gold);
        color: var(--ojf-dark);
    }

.ojf-tourTitle {
    flex: 1;
    text-align: end;
    min-width: 200px;
}

    .ojf-tourTitle .ojf-tourName {
        display: block;
        font-size: 18px;
        font-weight: 700;
        letter-spacing: .9px;
        color: var(--ojf-dark);
        text-transform: uppercase;
    }

    .ojf-tourTitle .ojf-tourEvent {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: var(--ojf-dark);
        margin-top: 2px;
    }

    .ojf-tourTitle .ojf-tourDate {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: var(--ojf-meta);
        margin-top: 2px;
    }

    .ojf-tourTitle .ojf-tourObs {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: var(--ojf-wo);
        margin-top: 2px;
    }

/* ---------- Pestanas de dias ---------- */
.ojf-tabStrip {
    display: flex;
    width: 100%;
}

.ojf-tab {
    flex: 1 1 0;
    height: 40px;
    line-height: 40px;
    border: none;
    border-radius: 0;
    padding: 0 4px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--ojf-tab-off-bg);
    color: var(--ojf-tab-off-text);
}

    .ojf-tab:hover,
    .ojf-tab:focus {
        text-decoration: none;
        color: var(--ojf-tab-off-text);
    }

    .ojf-tab.is-active,
    .ojf-tab.is-active:hover,
    .ojf-tab.is-active:focus {
        background: var(--ojf-gold);
        color: var(--ojf-dark);
        font-weight: 600;
    }

.ojf-panels {
    width: 100%;
}

    .ojf-panels [hidden] {
        display: none;
    }

/* ---------- Rejilla de pistas ---------- */
.ojf-viewWide {
    width: 100%;
    overflow-x: auto;
}

.ojf-courtRow {
    display: flex;
    align-items: flex-start;
}

.ojf-courtColumn {
    flex: 0 0 auto;
    width: var(--ojf-col-width);
    margin-right: 16px;
}

    .ojf-courtColumn:last-child {
        margin-right: 0;
    }

.ojf-courtHeader {
    width: 100%;
    margin-bottom: 8px;
    padding: 12px 8px;
    border-radius: 8px;
    background: var(--ojf-court-bg);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-align: center;
}

.ojf-columnItem {
    margin-bottom: 8px;
}

/* ---------- Tarjeta de partido ---------- */
.ojf-wrap {
    padding-top: 5px;
    padding-bottom: 5px;
    width: 100%;
}

.ojf-card {
    background: #fff;
    border-radius: 0;
    border: 1px solid var(--ojf-border);
    padding-top: 10px;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ojf-header {
    padding-left: 10px;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
}

.ojf-headerTop {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.ojf-headerLeft {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

.ojf-cat {
    font-weight: bold;
    letter-spacing: .9px;
    font-size: 14px;
    color: var(--ojf-dark);
}

.ojf-status {
    padding: 5px 10px;
    flex-shrink: 0;
    font-weight: 700;
    letter-spacing: .9px;
    font-size: 14px;
    color: var(--ojf-dark);
}

    .ojf-status.is-live {
        color: var(--ojf-wo);
    }

.ojf-headerBottom {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
}

.ojf-meta {
    min-width: 0;
    overflow: hidden;
}

.ojf-metaText {
    color: var(--ojf-meta);
    font-size: 14px;
}

.ojf-duration {
    padding-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ojf-meta);
    font-size: 14px;
}

.ojf-divider {
    height: 1px;
    background: var(--ojf-border);
    width: 100%;
    flex-shrink: 0;
}

.ojf-dividerTop {
    margin-top: 5px;
}

/* ---------- Fila de pareja ---------- */
.ojf-teamRow {
    padding: 5px 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
}

.ojf-teamNames {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.ojf-playerRow {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
}

.ojf-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}

.ojf-flag {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* Jugador sin nacionalidad: hueco del mismo tamaÃ±o que la bandera */
.ojf-flagEmpty {
    height: 14px;
    background: #d9d9d9;
}

/* Torneos por equipos: el jugador va sin bandera (la lleva el pais), pero se
   deja su hueco para que el nombre siga alineado debajo del pais */
.ojf-flagHueco {
    display: block;
    flex-shrink: 0;
    width: 20px;
}

/* Bola del que tiene el saque, detras de su nombre */
.ojf-serve {
    display: block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--ojf-gold);
    border: 1px solid var(--ojf-dark);
}

.ojf-cardLink,
.ojf-cardLink:hover,
.ojf-cardLink:focus {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ojf-nameWrap {
    min-width: 0;
    min-height: 1.35em;
    padding-left: 20px;
    overflow: hidden;
}

/* El motivo del partido (Wo just. / Ret. just.) va delante de los sets y no
   encoge: son los nombres los que se recortan, no la fila la que se descuadra */
.ojf-name,
.ojf-team {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ojf-name {
    color: var(--ojf-dark);
    font-size: 14px;
    font-weight: 500;
}

.ojf-teamRow.is-winner .ojf-name {
    font-weight: 900;
}

.ojf-tag {
    flex-shrink: 0;
    padding-left: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--ojf-meta);
    white-space: nowrap;
}

.ojf-team {
    display: block;
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--ojf-meta);
    text-transform: uppercase;
}

/* ---------- Marcador ---------- */
.ojf-scoreGroup {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

.ojf-checkWrap {
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.ojf-check {
    width: 24px;
    height: 24px;
    display: block;
}

.ojf-checkPlaceholder {
    height: 34px;
    display: block;
}

.ojf-textInFront {
    padding-right: 10px;
    color: var(--ojf-wo);
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    white-space: nowrap;
}

.ojf-setsRow {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.ojf-setBoxOuter {
    width: 40px;
    height: 30px;
    flex-shrink: 0;
    display: flex;
}

.ojf-setBoxInner {
    border-radius: 3px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.ojf-set {
    color: black;
    font-size: 16px;
    font-weight: 400;
}

.ojf-teamRow.is-winner .ojf-set {
    font-weight: 900;
}

.ojf-tieBreak {
    position: absolute;
    top: -5px;
    left: 26px;
    line-height: 1;
    white-space: nowrap;
    font-size: 11px;
    color: var(--ojf-dark);
}

/* Punto del juego en curso: caja destacada detras de los sets */
.ojf-gameBox {
    width: 32px;
    height: 30px;
    flex-shrink: 0;
    margin-left: 4px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ojf-gold);
}

.ojf-game {
    color: var(--ojf-dark);
    font-size: 15px;
    font-weight: 700;
}

/* ---------- Mensajes ---------- */
.ojf-empty {
    padding: 40px 12px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--ojf-dark);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .ojf-courtRow {
        flex-direction: column;
    }

    .ojf-courtColumn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .ojf-viewWide {
        overflow-x: visible;
    }
}

@media (max-width: 420px) {
    .ojf-name,
    .ojf-metaText,
    .ojf-duration {
        font-size: 12px;
    }

    .ojf-setBoxOuter {
        width: 30px;
    }

    .ojf-gameBox {
        width: 26px;
    }

    .ojf-game {
        font-size: 13px;
    }

    .ojf-tieBreak {
        left: 20px;
    }

    .ojf-tab {
        font-size: 12px;
    }

    .ojf-mode {
        height: 30px;
        line-height: 30px;
        padding: 0 10px;
        font-size: 12px;
    }
}
