/*
 * Ações em linha de tabela (26/10/2026) · padrão "1 botão principal + ⋯". Ver portal/js/rowMenu.js.
 *  .rm-cell      célula de ações (fim da linha, alinhada à direita, sem quebra)
 *  .rm-actions   agrupa o botão principal + o ⋯
 *  .rm-main      o único botão de texto visível (ação do dia a dia da tela)
 *  .rm-status    situação Ativo/Inativo no lugar do switch (.is-on verde, .is-off cinza)
 *  .rm-chip      chip clicável que leva a outra tela (ex.: conta a pagar) — com seta ›
 *  .rm-row       linha clicável (posta pelo row-open)
 */
.rm { position: relative; display: inline-flex; vertical-align: middle; }
.rm-btn {
	width: 32px; height: 32px; min-width: 32px; margin: 0; padding: 0; border-radius: 9px; border: 1px solid transparent;
	background: transparent; color: #3A465E; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	font: 700 18px/1 'IBM Plex Sans', system-ui, sans-serif; letter-spacing: 0; transition: background .12s, border-color .12s;
}
.rm-btn span { transform: translateY(-1px); }
.rm-btn:hover, .rm.is-open .rm-btn { background: #F1F4F9; border-color: #DDE3EE; color: #0B1220; }
.rm-btn:focus { outline: none; }
.rm-btn:focus-visible { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7C3AED; }

.rm-pop {
	position: fixed; z-index: 1150; left: 0; top: 0; box-sizing: border-box;
	min-width: 200px; max-width: min(320px, calc(100vw - 16px)); overflow-y: auto; overscroll-behavior: contain;
	background: #fff; border: 1px solid #DDE3EE; border-radius: 10px; padding: 6px;
	box-shadow: 0 12px 28px rgba(11, 18, 32, .16); text-align: left; visibility: hidden;
	font-family: 'IBM Plex Sans', system-ui, 'Segoe UI', Roboto, Arial, sans-serif; color: #0B1220;
}
.rm-pop.is-ready { visibility: visible; animation: rm-in .1s ease-out; }
@keyframes rm-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.rm-pop.is-up.is-ready { animation-name: rm-in-up; }
@keyframes rm-in-up { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.rm-pop__items { display: flex; flex-direction: column; }
.rm-pop__items > button, .rm-pop__items > .rm-item {
	position: relative; display: flex; width: 100%; min-height: 34px; align-items: center; gap: 9px; margin: 0; border: 0; background: none;
	padding: 7px 10px; border-radius: 7px; font: 500 13.5px/1.3 inherit; font-family: inherit; color: #0B1220; cursor: pointer;
	text-align: left; white-space: normal; text-transform: none; letter-spacing: normal; box-shadow: none;
}
.rm-pop__items > button ng-md-icon, .rm-pop__items > button svg, .rm-pop__items > button .material-icons { flex: none; width: 16px; height: 16px; font-size: 16px; color: #56627A; fill: #56627A; }
.rm-pop__items > button:hover:not([disabled]), .rm-pop__items > button:focus:not([disabled]) { background: #F1F4F9; outline: none; }
.rm-pop__items > button:focus-visible { box-shadow: inset 0 0 0 2px #7C3AED; }
.rm-pop__items > button[disabled] { color: #98A2B3; cursor: not-allowed; }
.rm-pop__items > button[disabled] ng-md-icon svg { fill: #98A2B3; }
.rm-pop__items > button.is-danger { color: #B42318; }
.rm-pop__items > button.is-danger ng-md-icon svg { fill: #B42318; }
.rm-pop__items > button.is-danger:hover:not([disabled]), .rm-pop__items > button.is-danger:focus:not([disabled]) { background: #FEF3F2; }
/* divisória antes do primeiro item vermelho (Excluir e afins ficam por último) */
.rm-pop__items > button:not(.is-danger):not(.ng-hide) ~ button.is-danger:not(.ng-hide) ~ button.is-danger,
.rm-pop__items > hr { }
.rm-pop__items > button:not(.is-danger) + button.is-danger,
.rm-pop__items > button:not(.is-danger) + .ng-hide + button.is-danger { margin-top: 7px; }
.rm-pop__items > button:not(.is-danger) + button.is-danger::before,
.rm-pop__items > button:not(.is-danger) + .ng-hide + button.is-danger::before {
	content: ''; position: absolute; left: 4px; right: 4px; top: -4px; border-top: 1px solid #E6EAF2;
}
.rm-pop__items > hr { margin: 5px 4px; border: 0; border-top: 1px solid #E6EAF2; }
.rm-pop__items small { display: block; font-size: 12px; color: #56627A; font-weight: 400; }
.rm-pop__items > button > span { min-width: 0; }
.rm-none { display: block; padding: 8px 10px; font-size: 13px; color: #56627A; }
/* dica do item desabilitado */
.rm-pop__items > button[disabled][data-reason]:hover::after,
.rm-pop__items > button[disabled][data-reason]:focus::after {
	content: attr(data-reason); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 2;
	width: max-content; max-width: 260px; padding: 8px 10px; border-radius: 8px; background: #0B1220; color: #fff;
	font: 400 12.5px/1.4 'IBM Plex Sans', system-ui, sans-serif; white-space: pre-line; box-shadow: 0 10px 24px rgba(11, 18, 32, .25); pointer-events: none;
}
.rm-pop { overflow: visible; }
.rm-pop[style*="max-height"] { overflow-y: auto; }

/* confirmação dentro do menu (sem segundo modal) */
.rm-pop.is-confirming .rm-pop__items { display: none; }
.rm-confirm { width: 260px; max-width: 100%; padding: 6px 6px 4px; }
.rm-confirm p { margin: 0 0 4px; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #0B1220; }
.rm-confirm small { display: block; margin: 0 0 4px; font-size: 12.5px; line-height: 1.4; color: #56627A; }
.rm-confirm__row { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.rm-confirm__row button {
	height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid #C9D2E3; background: #fff; color: #0B1220;
	font: 600 13px/1 'IBM Plex Sans', system-ui, sans-serif; cursor: pointer;
}
.rm-confirm__row button:hover { border-color: #0B1220; }
.rm-confirm__row .rm-confirm__yes { background: #B42318; border-color: #B42318; color: #fff; }
.rm-confirm__row .rm-confirm__yes:hover { background: #912018; border-color: #912018; }
.rm-confirm__row button:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7C3AED; }

/* célula e botão principal */
.rm-cell { width: 1%; white-space: nowrap; text-align: right; }
.rm-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.rm-main {
	display: inline-flex; align-items: center; justify-content: center; height: 32px; margin: 0; padding: 0 12px;
	border-radius: 9px; border: 1px solid #C9D2E3; background: #fff; color: #0B1220; cursor: pointer;
	font: 600 13px/1 'IBM Plex Sans', system-ui, sans-serif; white-space: nowrap; text-transform: none; letter-spacing: normal;
}
.rm-main:hover:not([disabled]) { border-color: #0B1220; }
.rm-main[disabled] { opacity: .55; cursor: default; }
.rm-main:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7C3AED; }

/* linha clicável */
.rm-row { cursor: pointer; }
.rm-row:hover > td { background-color: #FAFBFD; }

/* situação no lugar do switch */
.rm-status {
	display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
	font: 600 12px/1 'IBM Plex Sans', system-ui, sans-serif; white-space: nowrap; border: 1px solid transparent;
}
.rm-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rm-status.is-on { background: #ECFDF3; color: #067647; border-color: #ABEFC6; }
.rm-status.is-off { background: #F2F4F7; color: #475467; border-color: #E4E7EC; }

/* chip clicável que leva a outra tela */
.rm-chip {
	display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; margin: 0; padding: 0 8px 0 10px;
	border-radius: 999px; border: 1px solid #C9D2E3; background: #fff; color: #0B1220; cursor: pointer;
	font: 600 12.5px/1 'IBM Plex Sans', system-ui, sans-serif; white-space: nowrap; text-align: left;
	transition: background .12s, border-color .12s, box-shadow .12s;
}
.rm-chip::after { content: '›'; font-size: 16px; line-height: 1; color: #56627A; transform: translateY(-1px); }
.rm-chip:hover { border-color: #0B1220; background: #F6F8FC; box-shadow: 0 1px 2px rgba(11, 18, 32, .08); }
.rm-chip:hover::after { color: #0B1220; }
.rm-chip:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7C3AED; }
.rm-chip.is-warn { background: #FFFAEB; border-color: #FEDF89; color: #93370D; }
.rm-chip.is-warn:hover { border-color: #B54708; background: #FEF0C7; }
.rm-chip.is-ok { background: #ECFDF3; border-color: #ABEFC6; color: #067647; }
.rm-chip.is-ok:hover { border-color: #067647; background: #DCFAE6; }

/* texto só para leitor de tela (cabeçalho "Ações" da coluna do ⋯) */
.rm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* linha clicável que não é <tr> (listas em cartão/div: categorias, configurações, pedidos de revenda) */
div.rm-row:hover, article.rm-row:hover, li.rm-row:hover { background-color: #FAFBFD; }
/* a fonte do ⋯ e do botão principal não herda a da célula (ex.: .fx-num usa fonte mono; .pds button { font-family: inherit }) */
.rm > .rm-btn, .rm-actions > .rm-main { font-family: 'IBM Plex Sans', system-ui, 'Segoe UI', Roboto, Arial, sans-serif; }
