/* css/bet_panel.css */

/* --- 1. USER'S ORIGINAL PANEL STYLES (UNCHANGED) --- */

.bet-history-panel {
    background: #000;
    width: 100%;
    height: 100%;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #111;
    font-family: 'Roboto', sans-serif;
}

.panel-toggle-wrapper {
    padding: 8px 10px;
    background: #000;
    border-bottom: 1px solid #111;
}

.panel-toggle-container {
    display: flex;
    background: #111;
    border-radius: 20px;
    padding: 2px;
    height: 36px;
    border: 1px solid #222;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    line-height: 32px;
    font-size: 12px;
    color: #777;
    cursor: pointer;
    border-radius: 18px;
    font-weight: 500;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #2c2d30;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.panel-header-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    background: #1b1c1d;
    height: 42px;
    border-radius: 8px 8px 0 0;
}

.stats-left {
    display: flex;
    align-items: center;
}

.header-avatars {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.h-av {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #1b1c1d;
    margin-left: -8px;
    object-fit: cover;
}

.h-av:first-child {
    margin-left: 0;
}

.total-count-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #fff;
}

.total-val {
    font-size: 13px;
    font-weight: 700;
    color: #28a909;
    min-width: 60px;
}

.total-label {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
}

.active-dot {
    width: 6px;
    height: 6px;
    background: #28a909;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
}

.stats-right {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.total-win-val {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.total-win-label {
    font-size: 9px;
    color: #777;
    text-transform: uppercase;
}

.panel-progress-bar {
    width: 100%;
    height: 3px;
    background: #2c2d30;
}

.panel-progress-fill {
    height: 100%;
    width: 0%;
    background: #28a909;
    box-shadow: 0 0 8px #28a909;
    transition: width 0.1s linear;
}

.table-header {
    display: flex;
    padding: 8px 12px;
    background: #000;
    color: #666;
    font-size: 11px;
}

.col-user,
.col-date {
    width: 30%;
    text-align: left;
}

.col-bet {
    width: 25%;
    text-align: right;
}

.col-x {
    width: 15%;
    text-align: right;
}

.col-cash {
    width: 30%;
    text-align: right;
}

.table-body {
    flex: 1;
    overflow-y: auto;
    background: #000;
    padding: 5px 0;
}

.bet-row {
    display: flex;
    padding: 6px 12px;
    align-items: center;
    font-size: 13px;
    color: #ccc;
    background: #121212;
    margin: 3px 8px;
    border-radius: 20px;
    border: 1px solid #1a1a1a;
}

.u-av {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
}

.u-name {
    color: #999;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.val-bet {
    color: #fff;
    font-weight: 500;
    font-size: 13px;
}

.val-x {
    font-weight: 700;
    font-size: 13px;
    color: #555;
}

.val-cash {
    color: #ccc;
    font-size: 13px;
}

.col-blue {
    color: #3b82f6 !important;
}

.col-purple {
    color: #8b5cf6 !important;
}

.col-pink {
    color: #d946ef !important;
}

.bet-row.won {
    background: #0b140b;
    border: 1px solid #1e3a1e;
}

.bet-row.won .val-cash {
    color: #fff;
    font-weight: 700;
}

.my-bet-row {
    display: flex;
    padding: 8px 12px;
    align-items: center;
    font-size: 13px;
    color: #ccc;
    background: #121212;
    border-radius: 20px;
    margin: 4px 8px;
    border: 1px solid #222;
}

.my-bet-row.win-row {
    background: rgba(40, 169, 9, 0.1);
    border: 1px solid #28a909;
}

.shield-icon {
    color: #28a909;
    margin-left: 5px;
    font-size: 14px;
}

.date-text {
    font-size: 10px;
    color: #666;
    display: block;
    line-height: 1;
    margin-bottom: 2px;
}

.prev-round-box {
    text-align: center;
    padding: 10px;
    background: #111;
    border-bottom: 1px solid #222;
    margin: 10px;
    border-radius: 10px;
}

.prev-title {
    font-size: 11px;
    color: #888;
    margin-bottom: 5px;
}

.prev-result-val {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
}

.table-body::-webkit-scrollbar {
    width: 3px;
}

.table-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

/* --- 2. NEW CASHOUT POPUP STYLES (FINAL IMAGE MATCH) --- */

#cashout_notification_container {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 370px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* MAIN POPUP PILL */

.co-popup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* ✅ BACKGROUND: Dark Left -> Smooth Green Right */
    background: linear-gradient(90deg, #111311 20%, #1a2e1a 100%);
    /* ✅ SMOOTH BORDER (Not Neon) */
    border: 1px solid #3a7a30;
    border-radius: 50px;
    padding: 6px 10px 6px 0;
    /* Left padding removed here, handled in co-left */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 10px rgba(66, 168, 54, 0.1);
    font-family: 'Roboto', sans-serif;
    color: #fff;
    opacity: 0;
    transform: translateY(-20px);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    pointer-events: auto;
    overflow: hidden;
    height: 60px;
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ERROR STATE */

.co-popup.error {
    background: linear-gradient(90deg, #180808 20%, #2e1a1a 100%);
    border-color: #a83232;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

/* LEFT TEXT AREA */

.co-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* ✅ CENTER ALIGNMENT FOR TEXT & X */
    align-items: center;
    line-height: 1.1;
    /* ✅ BIG GAP FROM LEFT EDGE */
    margin-left: 35px;
    flex: 1;
}

.co-msg {
    font-size: 13px;
    color: #a0a0a0;
    /* Smooth Grey */
    font-weight: 400;
    margin-bottom: 2px;
    white-space: nowrap;
}

.co-mult {
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    /* Centered under label automatically via flex align-items */
}

/* RIGHT PILL (WIN BOX) */

.co-right-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* ✅ SMOOTH GREEN GRADIENT (Not Neon) */
    background: linear-gradient(180deg, #57b545 0%, #358226 100%);
    border-radius: 30px;
    padding: 2px 0;
    margin-left: 10px;
    margin-right: 12px;
    position: relative;
    /* ✅ SMOOTH BORDER */
    border: 1px solid #6ac95a;
    border-bottom-color: #27611b;
    width: 125px;
    /* Wider Width */
    height: 44px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* RED ERROR PILL */

.co-popup.error .co-right-pill {
    background: linear-gradient(180deg, #e05c5c 0%, #a61c1c 100%);
    border-color: #ff8f8f;
    border-bottom-color: #6e1212;
}

/* STARS */

.co-star {
    position: absolute;
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    /* Softer Stars */
    stroke-width: 1.5px;
    z-index: 0;
}

.s-left-1 {
    width: 14px;
    top: 6px;
    left: 10px;
    transform: rotate(-15deg);
}

.s-left-2 {
    width: 10px;
    bottom: 6px;
    left: 16px;
    transform: rotate(-30deg);
    opacity: 0.7;
}

.s-right-1 {
    width: 14px;
    top: 5px;
    right: 10px;
    transform: rotate(15deg);
}

.s-right-2 {
    width: 10px;
    bottom: 5px;
    right: 18px;
    transform: rotate(10deg);
    opacity: 0.7;
}

/* TEXT INSIDE PILL */

.co-win-lbl {
    font-size: 10px;
    color: #e3ffe0;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 1;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

.co-popup.error .co-win-lbl {
    color: #ffecec;
}

.co-win-amt {
    font-size: 18px;
    font-weight: 900;
    color: #fff;
    z-index: 1;
    line-height: 1.1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* CLOSE BUTTON */

.co-close {
    width: 28px;
    height: 28px;
    /* ✅ DARK BG as requested */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: #eee;
    cursor: pointer;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.co-close:active {
    background: rgba(0, 0, 0, 0.6);
}