/* Gameplay Action Bar */
#action-bar {
    position: fixed;
    bottom: 30px;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 15px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Pre-Action Bar Interface */
#pre-action-bar {
    display: none;
    position: fixed;
    bottom: 30px;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    z-index: 100;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 15px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Pre-Action Radio Customization */
.pre-action-btn input[type="radio"] {
    display: none;
}

.pre-action-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: 1px solid #444;
    border-radius: 8px;
    color: #aaa;
    background: linear-gradient(to bottom, #333, #111);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    text-align: center;
    user-select: none;
}

.pre-action-btn:hover {
    filter: brightness(1.2);
    color: #fff;
    transform: translateY(-2px);
}

/* Active Pre-Action States */
.pre-action-btn.active-fold {
    background: linear-gradient(to bottom, #d32f2f, #9a0007);
    color: white;
    border-color: #ff5252;
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.8);
}

.pre-action-btn.active-check {
    background: linear-gradient(to bottom, #388e3c, #1b5e20);
    color: white;
    border-color: #69f0ae;
    box-shadow: 0 0 15px rgba(56, 142, 60, 0.8);
}

.pre-action-btn.active-call {
    background: linear-gradient(to bottom, #1976d2, #0d47a1);
    color: white;
    border-color: #448aff;
    box-shadow: 0 0 15px rgba(25, 118, 210, 0.8);
}

/* Pre-Action Interface Reset */
#clear-pre-action {
    background: linear-gradient(to bottom, #555, #333);
    border: 1px solid #777;
    color: #ddd;
}


/* Standard Action Buttons */
.action-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition:
        transform 0.2s,
        filter 0.2s,
        box-shadow 0.2s;
}

.action-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(35%);
    transform: none;
}

.action-btn:active {
    transform: scale(0.95) translateY(0);
}

/* Specific Button Color Schemes */
#btn-fold {
    background: linear-gradient(to bottom, #d32f2f, #9a0007);
}

#btn-call {
    background: linear-gradient(to bottom, #388e3c, #1b5e20);
}

#btn-raise {
    background: linear-gradient(to bottom, #1976d2, #0d47a1);
}

#btn-all-in {
    background: linear-gradient(to bottom, #ffd54f, #ff8f00);
    color: #3e2723;
    text-shadow: none;
}

/* Bet Controls Interaction */
#bet-amount {
    font-size: 1.2rem;
    padding: 10px;
    width: 80px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

#bet-slider {
    width: 150px;
    accent-color: #ffaa00;
}

/* ============================================================
   A4.1 — Toast d'erreur d'action. Reste au-dessus de la barre
   d'action et, sur mobile paysage, au-dessus de l'input/slider
   de raise pour ne pas masquer la correction à faire.
   ============================================================ */
#action-error-toast {
    position: fixed;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #d32f2f, #9a0007);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    max-width: 80vw;
    text-align: center;
    user-select: none;
}
#action-error-toast.visible {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}
@media (max-width: 950px) and (orientation: landscape) {
    #action-error-toast {
        bottom: calc(145px + env(safe-area-inset-bottom, 0px));
        font-size: 13px;
        padding: 8px 16px;
        max-width: 70vw;
    }
}
