/* RATAN_M147_CHART_UI_V4 */

.rb147-current {
    margin:10px 0;
    padding:10px;
    border:2px solid var(--red);
    background:var(--peach);
    text-align:center;
}

.rb147-current-name {
    color:var(--navy);
    font-size:20px;
    font-weight:1000;
    text-transform:uppercase;
}

.rb147-current-date {
    margin:4px 0;
    color:#333;
    font-size:12px;
    font-weight:800;
}

.rb147-current-result {
    margin:5px 0;
    color:var(--pink-dark);
    font-size:19px;
    font-weight:1000;
}

.rb147-refresh {
    padding:6px 16px;
    border:0;
    border-radius:4px;
    background:var(--navy);
    color:#fff;
    font-weight:900;
    cursor:pointer;
}

.rb147-wrap {
    width:100%;
    margin:10px auto 15px;
    border:2px solid var(--red);
    background:#fff;
    overflow-x:auto;
}

.rb147-bar {
    padding:7px 4px;
    background:var(--navy);
    color:#fff;
    text-align:center;
    font-size:15px;
    font-weight:1000;
    text-transform:uppercase;
}

.rb147-table {
    width:100%;
    min-width:500px;
    border-collapse:collapse;
    table-layout:fixed;
}

.rb147-table th,
.rb147-table td {
    border:1px solid var(--red);
    padding:4px 2px;
    text-align:center;
    vertical-align:middle;
}

.rb147-table th {
    background:var(--red);
    color:#fff;
    font-size:10px;
    font-weight:1000;
    text-transform:uppercase;
}

.rb147-table th:first-child,
.rb147-date {
    width:14%;
}

.rb147-date {
    background:var(--peach);
    color:var(--navy);
    font-size:9px;
    line-height:1.15;
    font-weight:1000;
}

.rb147-date small {
    display:block;
    margin:2px 0;
    color:#444;
    font-size:7px;
}

.rb147-jodi {
    color:var(--navy);
    font-size:15px;
    font-weight:1000;
}

.rb147-jodi.red {
    color:var(--pink-dark);
}

.rb147-result-cell {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,1fr);
    align-items:center;
    min-height:48px;
}

.rb147-patti {
    color:var(--navy);
    font-size:9px;
    line-height:1;
    font-weight:1000;
}

.rb147-patti span {
    display:block;
}

.rb147-panel-jodi {
    color:var(--navy);
    font-size:13px;
    font-weight:1000;
}

.rb147-panel-jodi.red {
    color:var(--pink-dark);
}

.rb147-empty {
    color:#777;
    font-weight:800;
}

@media (max-width:560px) {
    .rb147-current-name { font-size:18px; }
    .rb147-current-result { font-size:18px; }

    .rb147-table {
        min-width:470px;
    }

    .rb147-table th {
        font-size:8px;
        padding:3px 1px;
    }

    .rb147-table td {
        padding:3px 1px;
    }

    .rb147-date { font-size:8px; }
    .rb147-jodi { font-size:12px; }
    .rb147-patti { font-size:8px; }
    .rb147-panel-jodi { font-size:11px; }
}

/* RATAN_MOBILE_NO_SCROLL_V5 */

/* Never allow chart itself to force horizontal scrolling */
.rb147-wrap {
    width: calc(100% - 8px) !important;
    max-width: 1120px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

.rb147-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}

/* Keep RatanBoss peach/orange cells instead of white */
.rb147-table tbody td,
.rb147-panel-table tbody td,
.rb147-jodi-table tbody td {
    background: var(--peach) !important;
}

/* Date column slightly wider, seven day cells share remaining width */
.rb147-table th:first-child,
.rb147-date {
    width: 17% !important;
}

.rb147-table th:not(:first-child) {
    width: 11.85% !important;
}

.rb147-result-cell {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 1fr .85fr 1fr !important;
    gap: 0 !important;
}

.rb147-result-cell > * {
    min-width: 0 !important;
}

@media (max-width: 700px) {

    .rb147-wrap {
        width: calc(100% - 4px) !important;
        margin: 6px auto 12px !important;
    }

    .rb147-table {
        min-width: 0 !important;
        width: 100% !important;
    }

    .rb147-table th,
    .rb147-table td {
        padding: 2px 1px !important;
    }

    .rb147-table thead th {
        font-size: 7px !important;
        line-height: 1.05 !important;
    }

    .rb147-date {
        width: 17% !important;
        font-size: 7px !important;
        line-height: 1.05 !important;
    }

    .rb147-date small {
        margin: 1px 0 !important;
        font-size: 6px !important;
    }

    .rb147-result-cell {
        min-height: 44px !important;
        grid-template-columns: 1fr .9fr 1fr !important;
    }

    .rb147-patti {
        font-size: 7px !important;
        line-height: .95 !important;
    }

    .rb147-patti span {
        min-width: 0 !important;
    }

    .rb147-panel-jodi {
        font-size: 11px !important;
        line-height: 1 !important;
    }

    .rb147-jodi {
        font-size: 11px !important;
        line-height: 1 !important;
    }
}

@media (max-width: 390px) {

    .rb147-table th:first-child,
    .rb147-date {
        width: 18% !important;
    }

    .rb147-table thead th {
        font-size: 6.5px !important;
    }

    .rb147-date {
        font-size: 6.5px !important;
    }

    .rb147-patti {
        font-size: 6.5px !important;
    }

    .rb147-panel-jodi,
    .rb147-jodi {
        font-size: 10px !important;
    }
}

/* RATAN_CELL_TEXT_V6 */

/* Desktop + mobile: text only, cell dimensions unchanged */
.rb147-table thead th {
    font-size: 11px !important;
}

.rb147-date {
    font-size: 10px !important;
}

.rb147-date small {
    font-size: 7px !important;
}

.rb147-jodi {
    font-size: 15px !important;
}

.rb147-panel-jodi {
    font-size: 14px !important;
}

.rb147-patti {
    font-size: 9px !important;
}

@media (max-width:700px) {
    .rb147-table thead th {
        font-size: 8px !important;
    }

    .rb147-date {
        font-size: 8px !important;
    }

    .rb147-date small {
        font-size: 6.5px !important;
    }

    .rb147-jodi {
        font-size: 12px !important;
    }

    .rb147-panel-jodi {
        font-size: 12px !important;
    }

    .rb147-patti {
        font-size: 7.5px !important;
    }
}

@media (max-width:390px) {
    .rb147-table thead th {
        font-size: 7.5px !important;
    }

    .rb147-date {
        font-size: 7.5px !important;
    }

    .rb147-jodi,
    .rb147-panel-jodi {
        font-size: 11px !important;
    }

    .rb147-patti {
        font-size: 7px !important;
    }
}
