

@media (max-width: 700px) {

    #strategyHubProduct .strategy-v21-table-wrap {
        overflow-x: auto !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
    }

    #strategyHubProduct .strategy-v21-auto-table,
    #strategyHubProduct .strategy-v21-brain-table {
        table-layout: fixed !important;
    }

    #strategyHubProduct .strategy-v21-auto-table {
        min-width: 760px !important;
    }

    #strategyHubProduct .strategy-v21-brain-table {
        min-width: 900px !important;
    }

    #strategyHubProduct .strategy-v21-auto-table td,
    #strategyHubProduct .strategy-v21-brain-table td {
        height: auto !important;
        vertical-align: middle !important;
        line-height: 1.35 !important;
        box-sizing: border-box !important;
        padding: 9px 8px !important;
    }

    /* Race and track names */

    #strategyHubProduct .strategy-v21-auto-table td:nth-child(2),
    #strategyHubProduct .strategy-v21-brain-table td:nth-child(2) {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        text-overflow: clip !important;
        overflow: hidden !important;
    }

    /* Runner number */

    #strategyHubProduct .strategy-v21-auto-table th:nth-child(3),
    #strategyHubProduct .strategy-v21-auto-table td:nth-child(3),
    #strategyHubProduct .strategy-v21-brain-table th:nth-child(3),
    #strategyHubProduct .strategy-v21-brain-table td:nth-child(3) {
        text-align: center !important;
        white-space: nowrap !important;
        font-weight: 800 !important;
    }

    /* Horse name */

    #strategyHubProduct .strategy-v21-auto-table td:nth-child(4),
    #strategyHubProduct .strategy-v21-brain-table td:nth-child(4) {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        text-overflow: clip !important;
        overflow: hidden !important;
        font-weight: 800 !important;
    }

}



#rbTipsheetOpen {
    background: #183e32;
    color: #fff;
    border: 1px solid #426c59;
    border-radius: 7px;
    padding: 10px 17px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin: 12px 0;
}

#rbTipsheetDialog {
    width: min(1100px, 96vw);
    max-height: 94vh;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #18241e;
    box-shadow: 0 20px 80px #0005;
}

#rbTipsheetDialog::backdrop {
    background: rgba(0,0,0,.75);
}

#rbTipsheetDialog * {
    box-sizing: border-box;
}

.rb-ts-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: #edf2ef;
    border-bottom: 1px solid #d5dfd9;
}

.rb-ts-toolbar button,
.rb-ts-toolbar input,
.rb-ts-toolbar select {
    border: 1px solid #c5d1c9;
    background: white;
    color: #183e32;
    border-radius: 5px;
    padding: 9px 12px;
    font-size: 13px;
}

.rb-ts-toolbar button {
    cursor: pointer;
    font-weight: 700;
}

.rb-ts-toolbar button:disabled {
    opacity: .5;
    cursor: default;
}

#rbTipsheetPrint {
    background: #183e32;
    color: white;
}

#rbTipsheetClose {
    margin-left: auto;
}

#rbTipsheetPaper {
    padding: 30px;
    background: #fff;
    color: #18241e;
    font-family: Arial, sans-serif;
}

.rb-ts-header {
    border-bottom: 3px solid #24553e;
    padding-bottom: 18px;
    margin-bottom: 20px;
}

.rb-ts-logo {
    width: 240px;
    max-width: 75%;
    height: auto;
    object-fit: contain;
}

.rb-ts-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: #557365;
    margin-top: 18px;
}

.rb-ts-title {
    font-size: 30px;
    font-weight: 800;
    margin: 5px 0;
    color: #183e32;
}

.rb-ts-meta {
    color: #64746b;
    font-size: 13px;
    line-height: 1.6;
}

.rb-ts-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    margin: 20px 0;
}

.rb-ts-stat {
    border: 1px solid #d9e3dc;
    background: #f4f7f5;
    border-radius: 7px;
    padding: 12px;
}

.rb-ts-stat strong {
    display: block;
    color: #183e32;
    font-size: 24px;
}

.rb-ts-stat span {
    font-size: 11px;
    color: #64746b;
    font-weight: 700;
    text-transform: uppercase;
}

.rb-ts-table-wrap {
    overflow-x: auto;
}

.rb-ts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #18241e;
}

.rb-ts-table th {
    background: #183e32;
    color: white;
    text-align: left;
    padding: 11px 8px;
    white-space: nowrap;
}

.rb-ts-table td {
    padding: 11px 8px;
    border-bottom: 1px solid #dce4df;
    vertical-align: middle;
}

.rb-ts-table tbody tr:nth-child(even) {
    background: #f5f7f6;
}

.rb-ts-horse {
    font-weight: 700;
}

.rb-ts-price {
    font-weight: 800;
    color: #183e32;
    white-space: nowrap;
}

.rb-ts-footer {
    border-top: 1px solid #dce4df;
    margin-top: 24px;
    padding-top: 12px;
    font-size: 10px;
    color: #68756d;
    line-height: 1.6;
}

#rbTipsheetStatus {
    padding: 15px 0;
    font-size: 13px;
    color: #64746b;
}

@media(max-width:700px) {
    #rbTipsheetPaper {
        padding: 16px;
    }

    .rb-ts-toolbar {
        padding: 10px;
    }

    .rb-ts-title {
        font-size: 25px;
    }

    .rb-ts-table {
        min-width: 620px;
    }

    .rb-ts-stat {
        padding: 8px;
    }
}

@page {
    size: A4 portrait;
    margin: 12mm;
}

@media print {
    body.rb-tipsheet-printing > *:not(#rbTipsheetDialog) {
        display: none !important;
    }

    body.rb-tipsheet-printing {
        background: white !important;
        overflow: visible !important;
        margin: 0 !important;
    }

    #rbTipsheetDialog {
        position: static !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 0 !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    #rbTipsheetDialog::backdrop,
    .rb-ts-toolbar {
        display: none !important;
    }

    #rbTipsheetPaper {
        padding: 0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .rb-ts-table-wrap {
        overflow: visible !important;
    }

    .rb-ts-table {
        min-width: 0 !important;
        font-size: 10px;
    }

    .rb-ts-table th,
    .rb-ts-table td {
        padding: 7px 5px;
    }

    .rb-ts-table thead {
        display: table-header-group;
    }

    .rb-ts-table tr {
        break-inside: avoid;
    }

    .rb-ts-header,
    .rb-ts-stats {
        break-inside: avoid;
    }
}
