/* Seletor de variação (grade) — PDV, PDV-Pro, comandas, totem e loja */

.grade-sel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

.grade-sel-overlay.aberto {
    display: flex;
}

.grade-sel-modal {
    background: var(--bg-card, #ffffff);
    color: var(--text-body, #33333d);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.grade-sel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border, #e2e5ee);
}

.grade-sel-titulo {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-heading, #14141a);
}

.grade-sel-base {
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
    margin-top: 2px;
}

.grade-sel-fechar {
    background: none;
    border: 0;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    padding: 0 4px;
}

.grade-sel-body {
    padding: 14px 18px 18px;
    overflow-y: auto;
}

.grade-sel-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grade-sel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border, #e2e5ee);
    border-radius: 10px;
    background: var(--bg-card, #ffffff);
    color: var(--text-body, #33333d);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.9rem;
}

.grade-sel-item:hover {
    border-color: var(--primary, #1f6fe0);
    background: rgba(var(--primary-rgb, 31, 111, 224), 0.06);
}

.grade-sel-item-zerado {
    opacity: 0.65;
}

.grade-sel-combo {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.grade-sel-tag {
    background: var(--bg-hover, #f1f3f7);
    border: 1px solid var(--border, #e2e5ee);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.78rem;
}

.grade-sel-dir {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.grade-sel-preco {
    font-weight: 800;
    color: var(--primary, #1f6fe0);
}

.grade-sel-saldo {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}

.grade-sel-zerado {
    color: var(--danger, #dc2626);
    font-weight: 700;
}

.grade-sel-vazio,
.grade-sel-carregando {
    color: var(--text-muted, #6b7280);
    font-size: 0.85rem;
    padding: 18px 4px;
    text-align: center;
}

@media (max-width: 600px) {
    .grade-sel-modal {
        max-width: 100%;
        max-height: 90vh;
    }

    .grade-sel-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .grade-sel-dir {
        align-items: flex-start;
        flex-direction: row;
        gap: 10px;
    }
}
