/* === Member Generated History Tree (Updated) === */

.cff-history-tree-group {
    border-top: 1px solid var(--panelBorder);
    background: #fff;
    margin-bottom: 10px;
}

.cff-history-tree-body {
    display: none;
    padding: 10px;
}

.cff-history-tree-group.cff-open > .cff-history-tree-body {
    display: block;
}

.cff-history-tree-toggle {
    width: 100%;
    border: 0;
    background: var(--siteTheme);
    color: var(--textColor);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    font-weight: 900;
    text-align: left;
    user-select: none;
}

.cff-history-tree-count {
    color: var(--muted);
    font-weight: 700;
}

.cff-history-year-group,
.cff-history-month-group,
.cff-history-day-group {
    margin-left: 14px;
}

.cff-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid var(--panelBorder);
    padding: 12px 0;
}

.cff-history-row:last-child {
    border-bottom: 0;
}

.cff-history-game {
    font-weight: 900;
    margin-bottom: 6px;
}

.cff-history-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.cff-history-ball {
    width: 28px !important;
    height: 28px !important;
    font-size: 13px !important;
    border-width: 1px !important;
    box-shadow: none !important;
    user-select: none;
}

.cff-history-time {
    margin:5px 35px;
    color:var(--muted);
    font-size:12px;
    white-space:nowrap;
    align-self:center;
    flex-shrink:0;
}

.cff-history-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cff-history-btn {
    padding: 7px 10px;
    font-size: 12px;
}
/* === History Row Name Final Override === */

.cff-history-tree-toggle .cff-history-lottery-power {
    color: #fff !important;
    background: radial-gradient(circle at 30% 25%, #f9b6b6, var(--powerRed) 65%, var(--powerRedDark));
    padding: 2px 10px;
    border-radius: 14px;
}

.cff-history-tree-toggle .cff-history-lottery-mega {
    color: #1565c0 !important;
    font-weight: 900;
}

.cff-history-tree-toggle .cff-history-lottery-default {
    color: var(--textColor);
}

.cff-mega-red { color:#d32f2f !important; }
.cff-mega-blue { color:#1565c0 !important; margin-left:2px; }
/* === End History Row Name Final Override === */


.cff-history-header-split{
    display:grid;
    grid-template-columns:minmax(0,1fr) 280px;
    gap:18px;
    align-items:start;
}

.cff-history-limit-panel{
    font-family:Consolas, "Courier New", monospace;
    font-size:12px;
    line-height:1.45;
    background:#fff;
    border:1px solid var(--panelBorder);
    padding:10px 12px;
}

.cff-history-limit-panel strong,
.cff-history-limit-panel span{
    display:block;
}

.cff-history-limit-panel strong{
    margin-bottom:5px;
    letter-spacing:.08em;
}

.cff-history-limit-panel summary{
    cursor:pointer;
    font-weight:900;
    letter-spacing:.08em;
    margin-bottom:6px;
}

.cff-history-limit-panel[open] summary{
    margin-bottom:8px;
}

.cff-history-limit-panel{
    overflow:hidden;
}

.cff-history-limit-panel summary{
    cursor:pointer;
    font-weight:900;
    letter-spacing:.08em;

    display:flex;
    align-items:center;
    justify-content:space-between;

    user-select:none;
}

.cff-history-limit-panel summary::after{
    content:"+";
    font-size:16px;
    transition:transform .25s ease;
}

.cff-history-limit-panel[open] summary::after{
    content:"−";
}

.cff-history-limit-panel > *:not(summary){
    animation:cffHistoryFade .25s ease;
}

.cff-history-typed-name,
.cff-saved-typed-name {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    color: var(--muted);
    margin: 5px 20px;
    white-space: nowrap;
}

@keyframes cffHistoryFade{
    from{
        opacity:0;
        transform:translateY(-4px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }
}

@media(max-width:720px){
    .cff-history-header-split{
        grid-template-columns:1fr;
    }
}






@media (max-width: 680px) {
    .cff-history-row {
        grid-template-columns: 1fr;
    }

    .cff-history-actions {
        justify-content: flex-start;
    }

    .cff-history-year-group,
    .cff-history-month-group,
    .cff-history-day-group {
        margin-left: 8px;
    }
}

/* === End Member Generated History Tree (Updated) === 
body {
    background: orange !important;
}*/