/* css/bet_panel.css */

/* --- 1. OFFICIAL SPRIBE BET HISTORY PANEL STYLES --- */

.bet-history-panel {
    background: #141516;
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid #26272b;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.panel-toggle-wrapper {
    padding: 8px 10px 4px 10px;
    background: #141516;
}

.panel-toggle-container {
    display: flex;
    background: #0e0e0e;
    border-radius: 20px;
    padding: 2px;
    height: 32px;
    max-width: 320px;
    margin: 0 auto;
    border: 1px solid #222326;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    line-height: 26px;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: #2c2d30;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.panel-header-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 12px;
    background: #141516;
    height: 40px;
}

.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: #22c55e;
    min-width: 60px;
}

.total-label {
    font-size: 10px;
    color: #aaa;
    text-transform: uppercase;
}

.active-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    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: #9ca3af;
    text-transform: none;
}

.panel-progress-bar {
    width: 100%;
    height: 2px;
    background: #222326;
}

.panel-progress-fill {
    height: 100%;
    width: 0%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
    transition: width 0.1s linear;
}

.table-header {
    display: flex;
    padding: 6px 12px;
    background: #141516;
    color: #9ca3af;
    font-size: 11px;
    border-top: 1px solid #222326;
}

.col-user,
.col-date {
    width: 30%;
    text-align: left;
    display: flex;
    align-items: center;
}

.col-bet {
    width: 25%;
    text-align: right;
}

.col-x {
    width: 18%;
    text-align: center;
}

.col-cash {
    width: 27%;
    text-align: right;
}

.table-body {
    height: 298px;
    max-height: 298px;
    overflow-y: auto;
    background: #141516;
    padding: 3px 0;
}

.bet-row {
    display: flex;
    padding: 4px 10px;
    height: 29px;
    align-items: center;
    font-size: 12.5px;
    color: #ccc;
    background: #101112;
    margin: 3px 6px;
    border-radius: 8px;
    border: 1px solid #1c1d20;
}

.u-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 8px;
    object-fit: cover;
}

.u-name {
    color: #9ca3af;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.val-bet {
    color: #e5e7eb;
    font-weight: 500;
    font-size: 12.5px;
}

.val-x {
    font-weight: 700;
    font-size: 12px;
    color: #555;
    text-align: center;
}

.val-cash {
    color: #e5e7eb;
    font-size: 12.5px;
}

.col-blue {
    color: #3b82f6 !important;
}

.col-purple {
    color: #8b5cf6 !important;
}

.col-pink {
    color: #d946ef !important;
}

.bet-row.won {
    background: #12340f;
    border: 1px solid #22c55e;
}

.bet-row.won .val-cash {
    color: #fff;
    font-weight: 700;
}

.my-bet-row {
    display: flex;
    padding: 4px 10px;
    height: 29px;
    align-items: center;
    font-size: 12.5px;
    color: #ccc;
    background: #101112;
    border-radius: 8px;
    margin: 3px 6px;
    border: 1px solid #1c1d20;
}

.my-bet-row.win-row {
    background: #12340f;
    border: 1px solid #22c55e;
}

.shield-icon {
    color: #22c55e;
    margin-left: 5px;
    font-size: 14px;
}

.date-text {
    font-size: 11px;
    color: #9ca3af;
    display: block;
    line-height: 1;
}

.prev-round-box {
    text-align: center;
    padding: 8px 10px;
    background: #0e0e0e;
    border-bottom: 1px solid #222;
    margin: 6px 8px;
    border-radius: 10px;
}

.prev-title {
    font-size: 11px;
    color: #888;
    margin-bottom: 3px;
}

.prev-result-val {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
}

.bet-panel-footer {
    height: 30px;
    background: #0e0e0e;
    border-top: 1px solid #222326;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    font-size: 11px;
    color: #8a8d93;
    flex-shrink: 0;
}

.bpf-left {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.bpf-right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spribe-foot-brand {
    color: #b0b3b8;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.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: fixed;
    top: 44px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 370px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* MAIN POPUP PILL */

.co-popup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #111311 20%, #1a2e1a 100%);
    border: 1px solid #28a745;
    border-radius: 50px;
    padding: 6px 10px 6px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 12px rgba(40, 167, 69, 0.28);
    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: 54px;
}

@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;
    align-items: center;
    line-height: 1.1;
    margin-left: 28px;
    flex: 1;
}

.co-msg {
    font-size: 12px;
    color: #a0a0a0;
    font-weight: 400;
    margin-bottom: 2px;
    white-space: nowrap;
}

.co-mult {
    font-size: 17px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
}

/* RIGHT PILL (WIN BOX) */

.co-right-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #32ab53 0%, #1a6730 100%);
    border-radius: 30px;
    padding: 2px 0;
    margin-left: 10px;
    margin-right: 10px;
    position: relative;
    border: 1px solid #4ade80;
    border-bottom-color: #166534;
    width: 122px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* 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);
    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: #fef9c3;
    font-weight: 700;
    text-transform: none;
    z-index: 1;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: 0.3px;
}

.co-popup.error .co-win-lbl {
    color: #ffecec;
}

.co-win-amt {
    font-size: 16px;
    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: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    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);
}

/* Spribe Aviator 3 Overlapping Avatars & Live Online Players Counter */
.header-avatars-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-avatars {
    display: flex;
    align-items: center;
}

.h-av {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    border: 1.5px solid #ffffff !important;
    margin-left: -8px !important;
    object-fit: cover !important;
    background: #1e1f23 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5) !important;
    transition: transform 0.2s ease;
}

.h-av:first-child {
    margin-left: 0 !important;
}

.h-av:hover {
    transform: scale(1.15);
    z-index: 5;
}

.live-players-num, #total_bets_count {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    letter-spacing: -0.2px !important;
    display: inline-block !important;
}

/* Official Spribe X-Multiplier Pill Badges inside All Bets / Previous / My Bets */
.x-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 11px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
}
.mult-pill-blue {
    background: rgba(52, 180, 255, 0.14);
    border: 1px solid rgba(52, 180, 255, 0.45);
    color: #34b4ff;
}
.mult-pill-purple {
    background: rgba(145, 62, 248, 0.16);
    border: 1px solid rgba(145, 62, 248, 0.5);
    color: #913ef8;
}
.mult-pill-pink {
    background: rgba(192, 23, 180, 0.16);
    border: 1px solid rgba(192, 23, 180, 0.5);
    color: #c017b4;
}
.user-own-row {
    border-color: rgba(255, 255, 255, 0.25) !important;
}
