/* HomePoker - poker dark theme overrides */

body {
    background-color: #1a1a2e;
    min-height: 100vh;
}

.navbar {
    background-color: #16213e !important;
    border-bottom: 2px solid #e94560;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

.card {
    background-color: #16213e;
    border: 1px solid #0f3460;
}

.card-header {
    background-color: #0f3460;
    border-bottom: 1px solid #e94560;
}

.btn-success {
    background-color: #1b998b;
    border-color: #1b998b;
}

.btn-success:hover {
    background-color: #158f82;
    border-color: #158f82;
}

.table-dark {
    --bs-table-bg: #16213e;
    --bs-table-striped-bg: #1a2744;
    --bs-table-hover-bg: #1e2d4f;
}

.text-danger {
    color: #e94560 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}

/* Game Night styles */
#timerDisplay {
    color: #e94560;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.4);
}

.net-cell.text-success {
    color: #1b998b !important;
    font-weight: 600;
}

.net-cell.text-danger {
    font-weight: 600;
}

#balanceWarning {
    border-color: #e94560;
}

/* Timer done animation */
.timer-done {
    animation: timerBlink 0.5s ease-in-out infinite;
    color: #ff0000 !important;
}

@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Page help toggle */
.help-toggle {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.help-toggle:hover { opacity: 1; }
.help-box {
    background: #0f3460;
    border: 1px solid #1a3a6e;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Profile Dashboard - Rank badges */
.rank-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1a1a2e !important;
    font-weight: 700;
}
.rank-silver {
    background: linear-gradient(135deg, #C0C0C0, #A8A8A8) !important;
    color: #1a1a2e !important;
    font-weight: 700;
}
.rank-bronze {
    background: linear-gradient(135deg, #CD7F32, #A0522D) !important;
    color: #fff !important;
    font-weight: 700;
}

/* Accordion dark theme overrides */
.accordion-button:not(.collapsed) {
    background-color: #0f3460 !important;
    color: #fff !important;
}
.accordion-button::after {
    filter: invert(1);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(233, 69, 96, 0.25);
}
.accordion-item {
    background-color: transparent !important;
    border-color: #0f3460 !important;
}

/* Mobile responsive card layout for game night table */
@media (max-width: 767.98px) {
    #resultsTable thead { display: none; }
    #resultsTable tbody tr {
        display: block;
        margin-bottom: 0.5rem;
        border: 1px solid #0f3460;
        border-radius: 0.5rem;
        padding: 0.5rem 0.75rem;
        background: #16213e;
    }
    #resultsTable tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.15rem 0;
        border: none;
        font-size: 0.9rem;
    }
    #resultsTable tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.75rem;
        white-space: nowrap;
        min-width: 70px;
        font-size: 0.8rem;
    }
    #resultsTable tbody td:first-child { display: none; }
    /* Touch-friendly but compact inputs */
    #resultsTable tbody td select,
    #resultsTable tbody td input {
        font-size: 0.9rem;
        padding: 0.35rem;
        min-height: 38px;
    }
    /* Net fields on one line */
    #resultsTable tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 0.5rem;
    }
    /* Player and buy-ins span full width */
    #resultsTable tbody td[data-label="Player"],
    #resultsTable tbody td[data-label="Buy-ins"],
    #resultsTable tbody td[data-label="Cash Out"] {
        grid-column: 1 / -1;
    }
    /* Footer totals as wrapped flex */
    #resultsTable tfoot tr {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    #resultsTable tfoot td { border: none; font-size: 0.9rem; }

    /* Profile game history mobile layout */
    #profileGameTable thead { display: none; }
    #profileGameTable tbody tr {
        display: block;
        margin-bottom: 0.5rem;
        border: 1px solid #0f3460;
        border-radius: 0.5rem;
        padding: 0.5rem 0.75rem;
        background: #16213e;
    }
    #profileGameTable tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.15rem 0;
        border: none;
        font-size: 0.9rem;
    }
    #profileGameTable tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 0.75rem;
        font-size: 0.8rem;
    }
}
