/* Tabakka - Pedido Mínimo Pro
   Componente enxuto, herda a tipografia do tema (Kadence). */

.tbk-pm {
	--tbk-pm-cor: #c62828;
	--tbk-pm-cor-ok: #2e7d32;
	--tbk-pm-bg: rgba(0, 0, 0, .04);
	box-sizing: border-box;
	margin: 0 0 1.25em;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 6px;
	background: #fff;
	font-size: .95em;
	line-height: 1.45;
}

.tbk-pm * {
	box-sizing: border-box;
}

.tbk-pm.tbk-pm--oculto {
	display: none;
}

.tbk-pm__msg {
	margin: 0 0 10px;
	color: inherit;
}

.tbk-pm__msg strong {
	color: var(--tbk-pm-cor);
	white-space: nowrap;
}

.tbk-pm.is-ok .tbk-pm__msg strong {
	color: var(--tbk-pm-cor-ok);
}

/* Barra */
.tbk-pm__bar {
	position: relative;
	height: 8px;
	border-radius: 99px;
	background: var(--tbk-pm-bg);
	overflow: hidden;
}

.tbk-pm__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 99px;
	background: var(--tbk-pm-cor);
	transition: width .45s ease;
}

.tbk-pm.is-ok .tbk-pm__fill {
	background: var(--tbk-pm-cor-ok);
}

/* Legenda */
.tbk-pm__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	margin-top: 8px;
	font-size: .85em;
	opacity: .75;
}

.tbk-pm__meta-item strong {
	font-weight: 600;
}

/* Variações por contexto */
.tbk-pm--minicart {
	margin-bottom: .75em;
	padding: 10px 12px;
	font-size: .85em;
}

.tbk-pm--minicart .tbk-pm__meta {
	display: none;
}

.tbk-pm--produto {
	margin: 1em 0 1.5em;
}

.tbk-pm--loja {
	margin-bottom: 1.5em;
}

/* Barra fixa */
.tbk-pm-barra-wrap {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 9999;
	pointer-events: none;
}

.tbk-pm-barra-bottom {
	bottom: 0;
}

.tbk-pm-barra-top {
	top: 0;
}

.tbk-pm-barra-wrap .tbk-pm {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	padding: 12px 20px;
	border: 0;
	border-radius: 0;
	pointer-events: auto;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, .12);
	background: #fff;
}

.tbk-pm-barra-top .tbk-pm {
	box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.tbk-pm-barra-wrap .tbk-pm__inner {
	flex: 1 1 auto;
	min-width: 0;
}

.tbk-pm-barra-wrap .tbk-pm__msg {
	margin-bottom: 6px;
}

.tbk-pm-barra-wrap .tbk-pm__meta {
	margin-top: 6px;
}

.tbk-pm__acoes {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
}

.tbk-pm__btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 4px;
	background: var(--tbk-pm-cor);
	color: #fff !important;
	text-decoration: none !important;
	font-size: .9em;
	font-weight: 600;
	white-space: nowrap;
}

.tbk-pm__btn:hover,
.tbk-pm__btn:focus {
	opacity: .88;
	color: #fff !important;
}

.tbk-pm__fechar {
	padding: 0 6px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: .5;
}

.tbk-pm__fechar:hover {
	opacity: 1;
}

.tbk-pm-barra-wrap.tbk-pm-dispensada {
	display: none;
}

/* Aviso de bloqueio no mesmo layout do bloco */
.woocommerce-error.tbk-pm-error-notice,
ul.woocommerce-error.tbk-pm-error-notice,
.wc-block-components-notice-banner.tbk-pm-error-notice {
	list-style: none !important;
	display: block;
	margin: 0 0 1.25em;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, .1);
	border-left: 4px solid var(--tbk-pm-cor-global, #c62828);
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font-size: .95em;
	line-height: 1.45;
	box-shadow: none;
}

.tbk-pm-error-notice::before,
.tbk-pm-error-notice > li::before,
.tbk-pm-error-notice .wc-block-components-notice-banner__content::before {
	content: none !important;
	display: none !important;
}

.tbk-pm-error-notice > li,
.tbk-pm-error-notice li {
	list-style: none !important;
	margin: 0;
	padding: 0;
}

.tbk-pm-error-notice > svg,
.tbk-pm-error-notice .wc-block-components-notice-banner__summary {
	display: none;
}

.tbk-pm-error-notice .button {
	display: none;
}

.tbk-pm-aviso strong {
	color: var(--tbk-pm-cor-global, #c62828);
	white-space: nowrap;
}

/* Botão de checkout desabilitado */
.wc-proceed-to-checkout .tbk-pm-botao-bloqueado,
.tbk-pm-botao-bloqueado {
	display: block;
	width: 100%;
	text-align: center;
	opacity: .55;
	cursor: not-allowed;
	pointer-events: none;
}

/* Acessibilidade / responsivo */
@media (max-width: 600px) {
	.tbk-pm-barra-wrap .tbk-pm {
		flex-wrap: wrap;
		padding: 10px 14px;
		gap: 8px;
	}

	.tbk-pm-barra-wrap .tbk-pm__meta {
		font-size: .8em;
	}

	.tbk-pm__acoes {
		width: 100%;
		justify-content: space-between;
	}

	.tbk-pm__btn {
		flex: 1 1 auto;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tbk-pm__fill {
		transition: none;
	}
}

/* Modo escuro do tema, se houver */
@media (prefers-color-scheme: dark) {
	body.tbk-pm-dark .tbk-pm {
		background: rgba(255, 255, 255, .06);
		border-color: rgba(255, 255, 255, .14);
	}
}
