/* ==========================================================================
   Lider Aviação — Cotação de Peças
   @package theme-lider-aviacao
   ========================================================================== */

/* ── Reset base do módulo ─────────────────────────────────────────────────── */
#lider-cotacao-wrap *,
#lider-cotacao-wrap *::before,
#lider-cotacao-wrap *::after {
	box-sizing: border-box;
}

#lider-cotacao-wrap {
	font-family: inherit;
}

/* ── Seção de Busca ───────────────────────────────────────────────────────── */
#lider-busca-section {
	display: flex;
	align-items: center;
	gap: 30px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

#lider-busca-section .lider-busca-col {
	flex-basis: 45%;
	min-width: 220px;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-grow: 1;
	flex-flow: row wrap;
}

#lider-busca-section .lider-input-group {
	position: relative;
	flex: 1 1 auto;
}

#lider-busca-section .lider-input-group label {
	position: absolute;
	top: 8px;
	left: 16px;
	z-index: 5;
	pointer-events: none;
	font-weight: 700;
	font-size: 12px;
}

#lider-busca-section .lider-input-group input {
	padding: 24px 16px 8px 16px !important;
	height: 64px !important;
	font-size: 16px;
	background-color: #ffffff;
	border: 1px solid rgb(102, 102, 102);
	border-radius: 2px;
	width: 100%;
}

#lider-busca-section #lider-busca-download {
	justify-content: flex-end;
}

#lider-busca-section .lider-busca-col .lider-busca-btn,
#lider-busca-section .lider-busca-col .lider-catalogo-btn {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 64px !important;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	padding: 10px 20px;
	cursor: pointer;
	transition: all 0.2s, color 0.2s;
	border-radius: 4px;
	justify-content: center;
}

#lider-busca-section .lider-busca-btn {
	background: #1a1a1a;
	color: #fff;
	border: none;
}

#lider-busca-section .lider-busca-btn:hover {
	background: #333;
}

#lider-busca-section .lider-catalogo-btn {
	border: 1px solid #ccc;
	color: #444;
}

#lider-busca-section .lider-catalogo-btn:hover {
	background: #959595;
	border-color: #959595;
	color: #fff;
}

@media (max-width:783px) {
	#lider-busca-section .lider-busca-col {
		flex-basis: 100%;
	}

	#lider-busca-section #lider-busca-download {
		order: -1;
		justify-content: flex-start;
	}
}

@media (max-width:400px) {

	#lider-busca-section .lider-busca-col .lider-busca-btn,
	#lider-busca-section .lider-busca-col .lider-catalogo-btn {
		flex-grow: 1;
		flex-basis: 100%;
	}
}

/* ── Mensagens ────────────────────────────────────────────────────────────── */
.lider-msg {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-radius: 4px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.lider-msg--info {
	background: #e8f4fd;
	border: 1px solid #b8d9f0;
	color: #1a5276;
}

.lider-msg--erro {
	background: #fdf2f2;
	border: 1px solid #f1b0b0;
	color: #922b21;
}

.lider-msg-texto a {
	color: inherit;
	font-weight: 600;
}

.lider-msg-fechar {
	background: none;
	border: none;
	font-size: 16px;
	cursor: pointer;
	padding: 8px !important;
	line-height: 1;
	color: inherit;
	opacity: 0.6;
	flex-shrink: 0;
}

.lider-msg-fechar:hover {
	opacity: 1;
}

/* ── Tabela de Resultados ─────────────────────────────────────────────────── */
#lider-resultado-pn {
	margin-bottom: 24px;
}

.lider-table-wrap {
	width: 100%;
	overflow-x: auto;
}



.lider-tabela-resultados {
	width: 100%;
	min-width: 550px;
	border-collapse: collapse;
	font-size: 14px;
}

.lider-tabela-resultados thead tr {
	background: #f4f4f4;
	border-bottom: 2px solid #ddd;
}

.lider-tabela-resultados th {
	padding: 10px 12px;
	text-align: left;
	font-weight: 600;
	color: #333;
	white-space: nowrap;
}

.lider-tabela-resultados td {
	padding: 10px 12px;
	border-bottom: 1px solid #eee;
	color: #444;
	vertical-align: middle;
}

.lider-tabela-resultados tbody tr:hover {
	background: #fafafa;
}

.lider-acoes .lider-acoes-wrapper {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* ── Botões de Ação (ícone) ───────────────────────────────────────────────── */
.lider-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 4px;
	border: none;
	background: #333;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	padding: 0 !important;
	color: #fff;
	border: none;
}

.lider-btn-icon:hover,
.lider-btn-icon:focus {
	background: #000;
}

.lider-btn-cart {
	background: #319694;
}

.lider-btn-cart:hover,
.lider-btn-cart:focus {
	background: #277775;
}

.lider-btn-delete {
	background: #97012F;
}

.lider-btn-delete:hover,
.lider-btn-delete:focus {
	background: #770226;
}

/* ── Col Nome: tabela de resultados (Nomenclatura + PN) ──────────────────── */
.lider-tabela-resultados .lider-col-nome strong {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #222;
}

.lider-tabela-resultados .lider-col-nome small {
	display: block;
	font-size: 12px;
	color: #888;
	margin-top: 3px;
}

/* ── Col Qtd + Condição: tabela de resultados ─────────────────────────────── */
.lider-col-qty-cond .lider-qty {
	display: block;
	font-size: 15px;
	font-weight: 400;
	color: #333;
}

.lider-col-qty-cond .lider-cond-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #555;
	margin-top: 3px;
}

/* ── Legenda genérica ─────────────────────────────────────────────────────── */
.lider-legenda {
	font-size: 12px;
	color: #777;
	margin-top: 8px;
}

/* ── Legenda Bell (sidebar) ───────────────────────────────────────────────── */
.lider-legenda--bell {
	font-size: 12px;
	color: #666;
	font-style: italic;
	margin-top: 14px;
	padding-top: 10px;
	border-top: 1px solid #eee;
	line-height: 1.5;
}

/* ── Bloco de Produtos no Forminator ─────────────────────────────────────── */
.lider-produtos-row {
	margin-bottom: 20px;
	overflow-x: auto;
}

.lider-tabela-carrinho {
	min-width: 550px;
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	border: 1px solid rgb(102, 102, 102);
}

.lider-tabela-carrinho thead tr {
	background: #333 !important;
	border-bottom: 2px solid #ddd;
}

.lider-tabela-carrinho th {
	padding: 8px 12px;
	text-align: left;
	font-weight: 600;
	color: #fff;
}

.lider-tabela-carrinho td {
	padding: 10px 12px;
	border: 1px solid rgb(102, 102, 102) !important;
	vertical-align: middle;
	background: #fff !important;
}

.lider-col-nome strong {
	display: block;
	font-weight: 600;
	color: #222;
}

.lider-col-nome small {
	display: block;
	font-size: 12px;
	color: #777;
	margin-top: 2px;
	display: flex;
	gap: 8px;
}

@media (max-width:768px) {
	.lider-col-nome small {
		flex-flow: column nowrap;
	}

	.lider-col-nome .peca-divider {
		display: none;
	}
}

.lider-col-qtd {
	white-space: nowrap;
}

.lider-tabela-carrinho .lider-input-qtd {
	width: 100px !important;
	text-align: center;
}

.lider-input-qtd:focus {
	outline: none;
	border-color: #1a4a30;
}

.lider-qtd-max {
	margin-left: 8px;
	font-size: 16px;
	font-weight: 600;
	color: #777;
}

.lider-col-acoes .lider-acoes-wrapper {
	display: flex;
	gap: 6px;
	align-items: center;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
#lider-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.60);
	z-index: 999998;
}

#lider-overlay.open {
	display: block;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
body.lider-sidebar-open {
	overflow-y: hidden !important;
}

#lider-sidebar {
	position: fixed;
	top: 0;
	right: -540px;
	width: 500px;
	max-width: 95vw;
	height: 100%;
	background: #fff;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
	transition: right 0.3s ease;
	overflow: hidden;
}

#lider-sidebar.open {
	right: 0;
}

#lider-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

#lider-sidebar-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #1a1a1a;
}

#lider-sidebar-close {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 4px;
	line-height: 1;
	transition: color 0.2s;
}

#lider-sidebar-close:hover {
	color: #111;
}

#lider-sidebar-content {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
}

.lider-sidebar-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.lider-sidebar-table tr {
	border-bottom: 1px solid #f0f0f0;
}

.lider-sidebar-table th {
	width: 45%;
	padding: 9px 8px;
	text-align: left;
	font-weight: 600;
	color: #444;
	vertical-align: top;
}

.lider-sidebar-table td {
	padding: 9px 8px;
	color: #222;
	vertical-align: top;
}

#lider-sidebar-footer {
	padding: 16px 20px;
	border-top: 1px solid #eee;
	flex-shrink: 0;
	font-size: 13px;
	color: #555;
}

#lider-sidebar-footer p {
	margin: 4px 0;
}

#lider-sidebar-footer a {
	color: #1a4a30;
	text-decoration: none;
}

#lider-sidebar-footer a:hover {
	text-decoration: underline;
}

/* Impede scroll do body quando sidebar está aberta */
body.lider-sidebar-open {
	overflow: hidden;
}

/* ── Responsivo ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
	#lider-busca-section {
		flex-direction: column;
		align-items: stretch;
	}

	.lider-catalogo-btn {
		text-align: center;
		justify-content: center;
	}

	/* Tabela resultados: 4 cols → esconde UOM (col 3) no mobile */
	.lider-tabela-resultados th:nth-child(3),
	.lider-tabela-resultados td:nth-child(3) {
		display: none;
	}

	.lider-tabela-carrinho th:nth-child(2),
	.lider-tabela-carrinho td:nth-child(2) {
		min-width: 120px;
	}

	#lider-sidebar {
		width: 100%;
		max-width: 100%;
		right: -100%;
	}
}