/* Auto play control for Dice and Roulette (casino/js/auto-play.js).
   Matches the slots "Auto spin x10" button: tinted orange to start, red tint
   while running. No hover transforms (they eat taps, LF PR #1001). */

.lf-auto {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.lf-auto[hidden] {
    display: none;
}

.lf-auto-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.lf-auto-title {
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.lf-auto-rounds {
    display: flex;
    gap: 0.375rem;
    flex: 0 0 auto;
}

.lf-auto-round {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.2s, border-color 0.2s;
}

.lf-auto-round.active {
    background: #f7931a;
    border-color: #f7931a;
    color: #1a1205;
}

.lf-auto-round:disabled {
    cursor: default;
    opacity: 0.55;
}

.lf-auto-round.active:disabled {
    opacity: 0.8;
}

.lf-auto-toggle {
    /* Basis lets the toggle wrap under the picker whenever the row runs out
       of room (narrow phones, enlarged text) instead of clipping its label. */
    flex: 1 1 7rem;
    min-width: max-content;
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(247, 147, 26, 0.45);
    background: rgba(247, 147, 26, 0.12);
    color: #f7931a;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.2s, border-color 0.2s;
}

.lf-auto-toggle.active {
    background: rgba(248, 81, 73, 0.14);
    border-color: rgba(248, 81, 73, 0.65);
    color: #ff7b72;
}

.lf-auto-toggle[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (hover: hover) {
    .lf-auto-round:not(:disabled):not(.active):hover {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.3);
    }
    .lf-auto-toggle:not([aria-disabled="true"]):not(.active):hover {
        background: rgba(247, 147, 26, 0.2);
        border-color: #f7931a;
    }
    .lf-auto-toggle.active:hover {
        background: rgba(248, 81, 73, 0.22);
    }
}

.lf-auto-opts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.lf-auto-field {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    min-height: 44px;
    max-width: 100%;
}

.lf-auto-select {
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
    min-height: 44px;
    padding: 0 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #16161c;
    color: #fff;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.lf-auto-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    cursor: pointer;
}

.lf-auto-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #f7931a;
    cursor: pointer;
}

/* While a run is going the settings are fixed; the progress line takes
   their place so the panel does not grow under the player's thumb. */
.lf-auto-running .lf-auto-opts {
    display: none;
}

.lf-auto-select:disabled,
.lf-auto-check input:disabled {
    cursor: default;
}

.lf-auto-status {
    font-size: 0.85rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.7);
    font-variant-numeric: tabular-nums;
}

.lf-auto-status:empty {
    display: none;
}

.lf-auto-status.lf-auto-live {
    color: #fff;
    font-weight: 600;
}

.lf-auto-round:focus-visible,
.lf-auto-toggle:focus-visible,
.lf-auto-select:focus-visible,
.lf-auto-check input:focus-visible {
    outline: 2px solid #f7931a;
    outline-offset: 2px;
}
