/* ============================================================
   Miami Open – Order of Play Frontend Styles
   Matches the card-per-match layout of miamiopen.com/order-of-play/
   ============================================================ */

/* ============================================================
   WRAPPER & GRID
   ============================================================ */

.miami-oop-wrapper {
    display: grid;
    /* Columns set inline by shortcode: [miami_order_of_play columns="3"]
       Default fallback is 3 columns if shortcode attribute is omitted. */
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 0;
    width: 100%;
    font-family: "Itau Text";
}

/* ============================================================
   COURT BLOCK  — transparent container, not a card
   ============================================================ */

.miami-oop-wrapper .court-matches {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #f7f7f7;
    padding: 20px;
    border-radius: 10px;
}

/* Court header row — name left, match count right */
.miami-oop-wrapper .court-header {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    gap: 12px;
    margin-bottom: 10px;
}

/* Court name — sentence-case bold heading above match cards */
/* !important needed to override Avada/theme h3 defaults */
.miami-oop-wrapper .court-name {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #141617 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-bottom: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-align: left !important;
    background: none !important;
    font-family: "Itau Display - Bold";
}

/* "X MATCHES" count — top-right of court block */
.miami-oop-wrapper .court-match-count {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #aaa !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    text-transform: uppercase !important;
}

/* ============================================================
   MATCH CARD  — each match is its own white card
   ============================================================ */

.miami-oop-wrapper .oop-match {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   MATCH HEADER  — round label left, session tag right
   ============================================================ */

.miami-oop-wrapper .oop-match-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.miami-oop-wrapper .oop-match-round {
    font-family: "Itau Display";
    font-size: 18px;
    font-weight: 700;
    text-transform: none;
    color: #888;
    line-height: 22px;
}

/* ============================================================
   SESSION TIME TAGS
   (Use exact same class names as the live Miami Open page)
   ============================================================ */

.miami-oop-wrapper .eta-start-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    background: #eeeeee;
    color: #888;
    text-align: right;
    flex-shrink: 0;
}

/* Day session — yellow/gold */
.miami-oop-wrapper .eta-start-tag.day {
    background: rgba(255, 245, 207, 0.8);
    color: #8A6C07;
    border: 1px solid rgba(138, 108, 7, 0.2);
}

/* Night session — blue */
.miami-oop-wrapper .eta-start-tag.night {
    background: rgba(0, 175, 238, 0.1);
    color: #2E439B;
    border: 1px solid rgba(46, 67, 155, 0.2);
}

/* Not Before — blue (matches live miamiopen.com) */
.miami-oop-wrapper .eta-start-tag.red {
    background: rgba(0, 175, 238, 0.1);
    color: #2E439B;
    border: 1px solid rgba(46, 67, 155, 0.2);
}

/* Completed — green */
.miami-oop-wrapper .eta-start-tag.complete {
    background: #E8F9E8;
    color: #368D3A;
    border: 1px solid rgba(54, 141, 58, 0.2);
}

/* ============================================================
   PLAYERS  — stacked vertically, no VS divider
   ============================================================ */

.miami-oop-wrapper .oop-match-players {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 7px;
    text-align: left !important;
}

/* Player row — uses .team class (existing Miami Open class) */
.miami-oop-wrapper .team {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px;
    text-align: left !important;
    width: 100%;
}

/* Flag image — .player-country is the existing Miami Open class */
.miami-oop-wrapper .player-country {
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 18px !important;
    border: 1px solid rgba(0,0,0,0.12) !important;
    border-radius: 2px !important;
    object-fit: cover !important;
}

/* Player name — .fusion-text is the existing Miami Open class */
.miami-oop-wrapper .fusion-text {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #141618 !important;
    text-align: left !important;
}

/* ============================================================
   DOUBLES MATCH LAYOUT
   ============================================================ */

/* Each team (pair of players) in a doubles match */
.miami-oop-wrapper .oop-doubles-team {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

/* VS divider — used between teams/players in all match types */
.miami-oop-wrapper .oop-doubles-vs,
.miami-oop-wrapper .oop-vs-divider {
    font-size: 11px;
    font-weight: 700;
    color: #5d5d5d;
    text-align: left;
    padding: 1px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   OR ALTERNATE OPPONENT  (horizontal layout)
   ============================================================ */

/* OR match layout: P1, then vs divider (same as regular), then bottom row (P2 or OR-Player) */
.miami-oop-wrapper .oop-or-match-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

/* Bottom row: P2 + "or" + OR-Player side by side */
.miami-oop-wrapper .oop-or-bottom-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* "or" separator between P2 and OR-Player on the bottom row */
.miami-oop-wrapper .oop-or-inline {
    font-size: 11px;
    font-weight: 700;
    color: #bbb;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.miami-oop-empty {
    color: #888;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .miami-oop-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: single column */
@media (max-width: 560px) {
    .miami-oop-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .miami-oop-wrapper .fusion-text {
        font-size: 0.85rem;
    }
}
