/* Billar Latino — game chrome (page uses hub/fz-room classes) */

.billar-panel {
    background: #fff;
    border: 1px solid var(--fz-line, #e5e7eb);
    border-radius: 14px;
    padding: 1rem 1rem 1.1rem;
}

body.billar-hub.dark-mode .billar-panel {
    background: #202124;
    border-color: #3c4043;
}

.billar-diff {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
}

.billar-diff__btn {
    border: 1px solid var(--fz-line, #e5e7eb);
    background: #fff;
    color: var(--fz-ink, #202124);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.billar-diff__btn.is-active {
    background: color-mix(in srgb, var(--hub-accent, #0a6e30) 14%, #fff);
    border-color: var(--hub-accent, #0a6e30);
    color: var(--hub-accent, #0a6e30);
}

body.billar-hub.dark-mode .billar-diff__btn {
    background: #292a2d;
    border-color: #3c4043;
    color: #e8eaed;
}

.billar-stage {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.billar-stage canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    touch-action: none;
    background: #0a6e30;
}

.billar-status {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--fz-ink, #202124);
    text-align: center;
}

.billar-status__sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--fz-muted, #5f6368);
}

.billar-mobile-controls {
    display: none;
    margin-top: 0.75rem;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.billar-mobile-controls.is-on {
    display: flex;
}

.billar-power-track {
    width: min(100%, 220px);
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    cursor: pointer;
}

.billar-power-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, #dc2626, #16a34a);
    border-radius: 999px;
}

.billar-tirar {
    border: 0;
    border-radius: 999px;
    background: var(--hub-accent, #0a6e30);
    color: #fff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.55rem 1.2rem;
    cursor: pointer;
}

.billar-tirar:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.billar-end {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--fz-line, #e5e7eb);
    background: #f8f9fa;
    text-align: center;
}

.billar-end.is-on { display: block; }

body.billar-hub.dark-mode .billar-end {
    background: #292a2d;
    border-color: #3c4043;
}

.billar-end h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.billar-end p {
    margin: 0 0 0.85rem;
    font-size: 0.86rem;
    color: var(--fz-muted, #5f6368);
}

.billar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
}

.billar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.5rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.billar-btn--primary {
    background: var(--hub-accent, #0a6e30);
    color: #fff;
}

.billar-btn--ghost {
    background: #fff;
    border-color: var(--fz-line, #e5e7eb);
    color: var(--fz-ink, #202124);
}

body.billar-hub.dark-mode .billar-btn--ghost {
    background: #202124;
    border-color: #3c4043;
    color: #e8eaed;
}

.billar-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.billar-toast.is-on { opacity: 1; }

.billar-how {
    margin: 1.25rem 0 0;
    max-width: 560px;
    width: 100%;
}

.billar-how__title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fz-ink, #202124);
}

.billar-how__box {
    background: #f8f9fa;
    border: 1px solid var(--fz-line, #e5e7eb);
    border-radius: 14px;
    padding: 1rem 1.1rem 1.05rem;
}

body.billar-hub.dark-mode .billar-how__box {
    background: #292a2d;
    border-color: #3c4043;
}

.billar-how__lead {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--fz-muted, #5f6368);
}

.billar-how__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.billar-how__list li {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.55rem 0.65rem;
}

.billar-how__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hub-accent, #0a6e30) 14%, #fff);
    color: var(--hub-accent, #0a6e30);
    font-size: 0.78rem;
    font-weight: 800;
}

.billar-how__step-title {
    margin: 0 0 0.15rem;
    font-size: 0.88rem;
    font-weight: 800;
}

.billar-how__step-desc {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--fz-muted, #5f6368);
}

.billar-how__foot {
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: #166534;
}

body.billar-hub.dark-mode .billar-how__foot { color: #86efac; }

@media (max-width: 760px) {
    .billar-mobile-controls.is-on { display: flex; }
}
