/**
 * Gerador de Paleta de Cores
 * /gerador-paleta-de-cores
 *
 * @package ChromatTheme
 */

/* Desktop: main ocupa exatamente a viewport abaixo do header, sem rolagem */
.site-main.palette-generator-page {
	display: flex;
	flex-direction: column;
	padding: 0;
	margin: 0;
	margin-bottom: 0;
	height: calc(100vh - 73.5px);
	min-height: 0;
	overflow: hidden;
}

/* Remove espaço entre main e rodapé do tema (área entre pontilhado vermelho e roxo) */
.site-main.palette-generator-page + .site-footer,
#page:has(.palette-generator-page) .site-footer {
	margin-top: 0 !important;
}

/* Submenu: 36px de altura, logo abaixo do header */
.palette-generator-submenu {
	flex-shrink: 0;
	height: 36px;
	display: flex;
	align-items: center;
	background: var(--color-bg, #fff);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.palette-generator-submenu .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	padding: 0 var(--space-md, 1rem);
	margin: 0 auto;
	max-width: 1600px;
	width: 100%;
}

@media (min-width: 1024px) {
	.palette-generator-submenu .container {
		padding-left: 60px;
		padding-right: 60px;
	}
}

.palette-generator-submenu-list {
	display: flex;
	align-items: center;
	gap: var(--space-lg, 1.5rem);
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 500;
}

.palette-generator-submenu-item a,
.palette-generator-submenu-item span {
	color: var(--color-text, #1a1a1a);
	text-decoration: none;
	opacity: 0.85;
}

.palette-generator-submenu-item a:hover {
	opacity: 1;
}

.palette-generator-submenu-item.current span {
	opacity: 1;
	font-weight: 600;
}

/* Ações à direita do submenu (Daltonismo + Ajustar) */
.palette-generator-submenu-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

/* Botão Daltonismo, Ajustar, Visualizar e Exportar: mesmo estilo base */
.palette-generator-submenu-daltonism-btn,
.palette-generator-submenu-adjust-btn,
.palette-generator-submenu-preview-btn,
.palette-generator-submenu-export-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	height: 30px;
	padding: 0 8px;
	border: none;
	background: transparent;
	color: var(--color-text, #1a1a1a);
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.2s ease, color 0.2s ease;
	gap: 6px;
}

/* Anular regras de .palette-export-btn do color-single.css (position: absolute; top: -34px) no submenu do gerador */
.palette-generator-submenu-actions .palette-export-btn,
.palette-generator-submenu-actions .palette-generator-submenu-export-btn {
	position: relative !important;
	top: auto !important;
	right: auto !important;
}

.palette-generator-submenu-daltonism-btn {
	width: 30px;
	padding: 0;
}

.palette-generator-submenu-adjust-btn {
	width: 30px;
	padding: 0;
}

.palette-generator-submenu-daltonism-btn:hover,
.palette-generator-submenu-adjust-btn:hover,
.palette-generator-submenu-preview-btn:hover,
.palette-generator-submenu-export-btn:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* Botão ativo quando o painel Daltonismo está aberto */
.palette-generator-page:has(.palette-generator-daltonism-open) .palette-generator-submenu-daltonism-btn {
	background: #E3EBFC;
}

.palette-generator-page:has(.palette-generator-daltonism-open) .palette-generator-submenu-daltonism-btn:hover {
	background: #d0ddf7;
}

.palette-generator-page:has(.palette-generator-daltonism-open) .palette-generator-submenu-daltonism-btn .palette-generator-submenu-daltonism-icon {
	filter: invert(27%) sepia(98%) saturate(5000%) hue-rotate(220deg) brightness(95%) contrast(90%);
}

.palette-generator-submenu-daltonism-icon,
.palette-generator-submenu-adjust-icon,
.palette-generator-submenu-preview-icon {
	display: block;
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.palette-generator-submenu-preview-icon {
	flex-shrink: 0;
}

.palette-generator-submenu-preview-text {
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
}

.palette-generator-submenu-export-text {
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
}

.palette-generator-submenu-export-icon {
	display: block;
	flex-shrink: 0;
}

.palette-generator-submenu-export-btn:hover .palette-generator-submenu-tooltip,
.palette-generator-submenu-daltonism-btn:hover .palette-generator-submenu-tooltip,
.palette-generator-submenu-adjust-btn:hover .palette-generator-submenu-tooltip,
.palette-generator-submenu-preview-btn:hover .palette-generator-submenu-tooltip {
	opacity: 1;
	visibility: visible;
}

.palette-generator-submenu-tooltip {
	position: absolute;
	left: 50%;
	top: 100%;
	transform: translateX(-50%);
	margin-top: 6px;
	padding: 6px 10px;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 500;
	white-space: nowrap;
	border-radius: 6px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	pointer-events: none;
	z-index: 10001;
}

.palette-generator-submenu-daltonism-btn:hover .palette-generator-submenu-tooltip,
.palette-generator-submenu-adjust-btn:hover .palette-generator-submenu-tooltip,
.palette-generator-submenu-preview-btn:hover .palette-generator-submenu-tooltip {
	opacity: 1;
	visibility: visible;
}

/* Deixar o submenu não cortar o tooltip (tooltip fica abaixo, dentro do main) */
.palette-generator-submenu,
.palette-generator-submenu .container {
	overflow: visible;
}

/* Wrapper artigo + painel Daltonismo (desktop) */
.palette-generator-content-wrap {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

@media (min-width: 769px) {
	.palette-generator-content-wrap.palette-generator-daltonism-open,
	.palette-generator-content-wrap.palette-generator-adjust-open {
		flex-direction: row;
	}
	.palette-generator-content-wrap.palette-generator-daltonism-open .palette-generator,
	.palette-generator-content-wrap.palette-generator-adjust-open .palette-generator {
		flex: 1;
		min-width: 0;
	}
}

/* Painel Daltonismo: lateral direita, só desktop */
.palette-generator-daltonism-panel {
	display: none;
	flex-shrink: 0;
	width: 280px;
	background: var(--color-bg, #fff);
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	padding: var(--space-md, 1rem);
	flex-direction: column;
	overflow-y: auto;
}

@media (min-width: 769px) {
	.palette-generator-daltonism-panel.is-open {
		display: flex;
	}
}

.palette-generator-daltonism-panel[aria-hidden="true"] {
	display: none !important;
}

.palette-generator-daltonism-title {
	margin: 0 0 var(--space-md, 1rem);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--color-text, #1a1a1a);
}

.palette-generator-daltonism-options {
	list-style: none;
	margin: 0 0 var(--space-md, 1rem);
	padding: 0;
}

.palette-generator-daltonism-option {
	display: block;
	position: relative;
	padding: 0.5rem 2.25rem 0.5rem 0.75rem;
	margin-bottom: 2px;
	border-radius: 6px;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.palette-generator-daltonism-option:hover {
	background: rgba(0, 0, 0, 0.06);
}

.palette-generator-daltonism-option:focus {
	color: #1D4ED8;
	outline: none;
}

.palette-generator-daltonism-option.is-selected {
	background: #E3EBFC;
	color: #1D4ED8;
}

.palette-generator-daltonism-option.is-selected::after {
	content: '\2713';
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	color: #1D4ED8;
	font-size: 1.1rem;
	font-weight: bold;
	line-height: 1;
}

.palette-generator-daltonism-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: var(--space-md, 1rem);
}

.palette-generator-daltonism-cancel,
.palette-generator-daltonism-apply {
	flex: 1;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.palette-generator-daltonism-cancel {
	background: rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.1);
	color: var(--color-text, #1a1a1a);
}

.palette-generator-daltonism-cancel:hover {
	background: rgba(0, 0, 0, 0.1);
}

.palette-generator-daltonism-apply {
	background: #2563EB;
	border: none;
	color: #fff;
}

.palette-generator-daltonism-apply:hover {
	background: #1d4ed8;
}

/* Botão Ajustar ativo quando o painel Ajustar está aberto */
.palette-generator-page:has(.palette-generator-adjust-open) .palette-generator-submenu-adjust-btn {
	background: #E3EBFC;
}

.palette-generator-page:has(.palette-generator-adjust-open) .palette-generator-submenu-adjust-btn:hover {
	background: #d0ddf7;
}

.palette-generator-page:has(.palette-generator-adjust-open) .palette-generator-submenu-adjust-btn .palette-generator-submenu-adjust-icon {
	filter: invert(27%) sepia(98%) saturate(5000%) hue-rotate(220deg) brightness(95%) contrast(90%);
}

/* Painel Ajustar paleta: lateral direita, só desktop */
.palette-generator-adjust-panel {
	display: none;
	flex-shrink: 0;
	width: 280px;
	background: var(--color-bg, #fff);
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	padding: var(--space-md, 1rem);
	flex-direction: column;
	overflow-y: auto;
}

@media (min-width: 769px) {
	.palette-generator-adjust-panel.is-open {
		display: flex;
	}
}

.palette-generator-adjust-panel[aria-hidden="true"] {
	display: none !important;
}

.palette-generator-adjust-title {
	margin: 0 0 var(--space-md, 1rem);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--color-text, #1a1a1a);
	text-align: center;
}

.palette-generator-adjust-options {
	display: flex;
	flex-direction: column;
	gap: var(--space-md, 1rem);
	margin: 0 0 var(--space-md, 1rem);
}

.palette-generator-adjust-option {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

/* Label e valor na mesma linha: label à esquerda, valor à direita */
.palette-generator-adjust-label-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
}

.palette-generator-adjust-label {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--color-text, #1a1a1a);
}

.palette-generator-adjust-label-row .palette-generator-adjust-value {
	flex-shrink: 0;
}

.palette-generator-adjust-slider-wrap {
	position: relative;
	height: 16px;
	border-radius: 6px;
	overflow: visible;
}

/* Ponto branco na posição 0 (centro da régua) */
.palette-generator-adjust-zero-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
	pointer-events: none;
	z-index: 1;
}

/* Gradientes das réguas */
.palette-generator-adjust-slider-hue {
	background: linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}

.palette-generator-adjust-slider-saturation {
	background: linear-gradient(to right, #808080 0%, #ff0000 100%);
}

.palette-generator-adjust-slider-brightness {
	background: linear-gradient(to right, #000000 0%, #ffffff 100%);
}

.palette-generator-adjust-slider-temperature {
	background: linear-gradient(to right, #0066ff 0%, #ffffff 50%, #ff9900 100%);
}

.palette-generator-adjust-range {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 2;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
}

/* Trilho transparente para deixar o gradiente do wrap aparecer */
.palette-generator-adjust-range::-webkit-slider-runnable-track {
	height: 16px;
	background: transparent;
	-webkit-appearance: none;
}

.palette-generator-adjust-range::-moz-range-track {
	height: 16px;
	background: transparent;
}

/* Thumb visível: círculo branco grande, borda cinza fina (como referência) */
.palette-generator-adjust-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #d1d5db;
	cursor: grab;
	margin-top: -3px; /* centralizar na trilha 16px */
	transition: box-shadow 0.2s ease;
}

.palette-generator-adjust-range::-webkit-slider-thumb:hover {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.palette-generator-adjust-range::-webkit-slider-thumb:active {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	cursor: grabbing;
}

.palette-generator-adjust-range::-moz-range-thumb {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #d1d5db;
	cursor: grab;
	transition: box-shadow 0.2s ease;
}

.palette-generator-adjust-range::-moz-range-thumb:hover {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.palette-generator-adjust-range::-moz-range-thumb:active {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	cursor: grabbing;
}


.palette-generator-adjust-value {
	width: 3.5rem;
	padding: 0.35rem 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	font-size: 0.9rem;
	text-align: center;
	background: #fff;
	color: var(--color-text, #1a1a1a);
	-moz-appearance: textfield;
}

.palette-generator-adjust-value:focus {
	outline: 1px solid #2563EB;
	outline-offset: 0;
	border-color: #2563EB;
}

.palette-generator-adjust-value::-webkit-outer-spin-button,
.palette-generator-adjust-value::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.palette-generator-adjust-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: var(--space-md, 1rem);
}

.palette-generator-adjust-cancel,
.palette-generator-adjust-apply {
	flex: 1;
	padding: 0.5rem 1rem;
	border-radius: 6px;
	font-size: 0.9rem;
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.palette-generator-adjust-cancel {
	background: rgba(0, 0, 0, 0.06);
	border: 1px solid rgba(0, 0, 0, 0.1);
	color: var(--color-text, #1a1a1a);
}

.palette-generator-adjust-cancel:hover {
	background: rgba(0, 0, 0, 0.1);
}

.palette-generator-adjust-apply {
	background: #2563EB;
	border: none;
	color: #fff;
}

.palette-generator-adjust-apply:hover {
	background: #1d4ed8;
}

/* Modo preview Ajustar: mesmo layout split do daltonismo, esconder botões e footer (só desktop) */
@media (min-width: 769px) {
	.palette-generator-strip-wrap:has(#palette-generator-strip.palette-generator-adjust-preview) .palette-generator-add-buttons,
	.palette-generator > .container:has(#palette-generator-strip.palette-generator-adjust-preview) .palette-generator-footer {
		display: none !important;
	}
}

/* Modo preview daltonismo: swatches cortados no meio (só desktop) */
@media (min-width: 769px) {
	.palette-generator-strip-wrap:has(#palette-generator-strip.palette-generator-daltonism-preview) .palette-generator-add-buttons,
	.palette-generator > .container:has(#palette-generator-strip.palette-generator-daltonism-preview) .palette-generator-footer {
		display: none !important;
	}

	/* Swatch dividido (original + simulado) preenche a célula da grid */
	.palette-generator-strip .palette-generator-swatch.palette-generator-swatch-split {
		min-width: 0;
		width: 100%;
	}

	.palette-generator-swatch-split {
		display: flex;
		flex-direction: column;
		height: 100%;
		min-height: 0;
		width: 100%;
		min-width: 0;
	}

	.palette-generator-swatch-half {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		min-height: 60px;
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.palette-generator-swatch-half-hex {
		font-family: var(--font-base, 'Inter', system-ui, sans-serif);
		font-size: 1rem;
		font-weight: 600;
		color: #fff;
		text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	}

	.palette-generator-swatch-half.text-dark .palette-generator-swatch-half-hex {
		color: #1a1a1a;
		text-shadow: none;
	}
}

.palette-generator-page .palette-generator {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.palette-generator-page .palette-generator > .container {
	padding: 0;
	margin: 0;
	height: 100%;
	max-width: none;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

/* Wrap: ocupa toda a altura disponível do container flex para não cortar a strip */
.palette-generator-page .palette-generator-strip-wrap {
	flex: 1;
	min-height: 0;
	height: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Strip dentro do wrap: preenche 100% da altura do wrap */
.palette-generator-strip-wrap .palette-generator-strip {
	flex: 1;
	min-height: 0;
	height: 100%;
}

.palette-generator-page .palette-generator-strip {
	flex: 1;
	min-height: 0;
	height: 100%;
}

/* Faixa de cores: preenche toda a área visível abaixo do header (sem ultrapassar) */
.palette-generator-strip {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 0;
	border-radius: 0;
	overflow: hidden;
	box-shadow: none;
	margin: 0;
	padding: 0;
	background: rgba(0, 0, 0, 0.06);
}

/* Botões "+" para adicionar tom: overlay, só no hover, não alteram o layout dos divs */
.palette-generator-add-buttons {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.palette-generator-add-btn {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: #000;
	font-size: 1.25rem;
	font-weight: 300;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	pointer-events: auto;
	opacity: 0;
	transition: opacity 0.2s ease, background 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Visibilidade dos botões "+" é controlada por JS (zona de 50px nas bordas de cada div) */

.palette-generator-add-btn:hover {
	background: #e0e0e0;
}

/* Mobile: cores uma em cima da outra, barra no rodapé com Gerar, só 4 ícones por swatch */
@media (max-width: 768px) {
	/* Sem scroll: página cabe na viewport */
	#page:has(.palette-generator-page) {
		overflow: hidden;
		height: 100vh;
		height: 100dvh;
	}
	.site-main.palette-generator-page {
		height: calc(100vh - 73.5px);
		height: calc(100dvh - 73.5px);
		min-height: 0;
		overflow: hidden;
		display: flex;
		flex-direction: column;
	}

	/* Sem submenu (Gerador de Paleta | Paletas) na versão mobile */
	.palette-generator-submenu {
		display: none !important;
	}

	/* Sem footer do site na página do gerador (mobile) */
	#page:has(.palette-generator-page) #colophon,
	#page:has(.palette-generator-page) .site-footer {
		display: none !important;
	}

	/* Sem campo Buscar no header (mobile, só nesta página) */
	#page:has(.palette-generator-page) .color-search-container {
		display: none !important;
	}

	.palette-generator-page {
		height: 100%;
		min-height: 0;
		overflow: hidden;
	}

	.palette-generator-page .palette-generator,
	.palette-generator-page .palette-generator > .container > * {
		height: auto;
	}

	.palette-generator-page .palette-generator {
		min-height: 0;
		flex: 1;
		display: flex;
		flex-direction: column;
	}

	/* Container: só header (sem submenu); strip + barra cabem na tela sem scroll */
	.palette-generator-page .palette-generator > .container {
		padding: 0;
		max-width: none;
		margin: 0;
		flex: 1;
		min-height: 0;
		display: flex;
		flex-direction: column;
		max-height: 100%;
		overflow: hidden;
	}

	.palette-generator-strip-wrap,
	.palette-generator-strip {
		flex: 1;
		min-height: 0;
		height: auto;
		display: flex;
		flex-direction: column;
		grid-template-columns: unset;
		overflow: hidden;
	}

	.palette-generator-strip .palette-generator-swatch {
		flex: 1;
		width: 100%;
		min-height: 60px;
		justify-content: center;
		padding-left: var(--space-md, 1rem);
		padding-right: var(--space-md, 1rem);
	}

	/* Código HEX à esquerda, fonte menor; ícones à direita, em linha; ambos centralizados verticalmente no swatch */
	.palette-generator-swatch .palette-generator-swatch-hex-wrap {
		position: absolute;
		top: 50%;
		left: var(--space-md, 1rem);
		right: auto;
		transform: translateY(-50%);
		text-align: left;
		display: flex;
		align-items: center;
	}

	.palette-generator-swatch .palette-generator-swatch-hex {
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1;
	}

	.palette-generator-swatch .palette-generator-swatch-menu {
		position: absolute;
		top: 50%;
		left: auto;
		right: var(--space-md, 1rem);
		bottom: auto;
		transform: translateY(-50%);
		flex-direction: row;
		gap: 0.25rem;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.palette-generator-swatch .palette-generator-swatch-action {
		padding: 0.4rem;
	}

	.palette-generator-swatch .palette-generator-swatch-action svg {
		width: 18px;
		height: 18px;
	}

	/* Ícone de arrastar: girar 90° no mobile */
	.palette-generator-swatch .palette-generator-swatch-menu [data-action="drag"] svg {
		transform: rotate(90deg);
	}

	/* Esconder botões de adicionar cor no mobile */
	.palette-generator-add-buttons {
		display: none !important;
	}

	/* No mobile: só Arrastar, Copiar, Informação e Cadeado */
	.palette-generator-swatch-menu [data-action="remove"],
	.palette-generator-swatch-menu [data-action="contrast"],
	.palette-generator-swatch-menu [data-action="shades"],
	.palette-generator-swatch-menu [data-action="favorite"] {
		display: none !important;
	}

	/* Barra do rodapé fixa embaixo; botão Gerar alinhado ao hex dos swatches (mesmo padding); altura -7px */
	.palette-generator-footer {
		flex-shrink: 0;
		width: 100%;
		justify-content: flex-start;
		padding: calc(var(--space-md, 1rem) - 3.5px) var(--space-md, 1rem);
		padding-left: var(--space-md, 1rem);
		background: var(--color-bg, #fff);
		border-top: 1px solid rgba(0, 0, 0, 0.08);
	}
}

/* Cada tom de cor: preenche a altura do strip */
.palette-generator-swatch {
	position: relative;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	padding-bottom: 2.5rem;
	cursor: default;
	transition: transform 0.15s ease;
}

.palette-generator-swatch:hover {
	z-index: 5;
}

/* Durante o arraste: o lugar fica igual ao fundo da faixa (sem caixa/borda); só o clone se destaca */
.palette-generator-swatch[data-dragging="true"] {
	cursor: grabbing;
	background: rgba(0, 0, 0, 0.06) !important;
	border: none;
}
.palette-generator-swatch[data-dragging="true"] > * {
	visibility: hidden;
}

/* Clone = o bloco que você está movendo; sólido, sombra leve */
.palette-generator-drag-image {
	box-sizing: border-box;
	opacity: 1 !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	border-radius: 0;
}
.palette-generator-drag-image,
.palette-generator-drag-image * {
	visibility: visible !important;
}

.palette-generator-swatch-menu {
	position: absolute;
	top: auto;
	bottom: calc(1.85rem + 40px + 1.2em); /* 40px entre o último ícone e o código HEX */
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.375rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
	z-index: 10;
	pointer-events: none;
	color: #fff;
}

.palette-generator-swatch:hover .palette-generator-swatch-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.palette-generator-swatch-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.525rem;
	padding: 0.525rem 0.9rem;
	background: transparent;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 1.125rem;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.palette-generator-swatch-action svg {
	width: 21px;
	height: 21px;
	flex-shrink: 0;
}

/* Tom escuro: hover um pouco mais escuro que o tom, ícones brancos */
.palette-generator-swatch-tone-dark .palette-generator-swatch-action:hover {
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
}

.palette-generator-swatch-tone-dark .palette-generator-swatch-action[data-action="remove"]:hover {
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
}

/* Tom claro: menu escuro por padrão (legível no fundo claro); hover mais claro que o tom, ícones escuros */
.palette-generator-swatch-tone-light .palette-generator-swatch-menu {
	color: #1a1a1a;
}

.palette-generator-swatch-tone-light .palette-generator-swatch-action {
	color: #1a1a1a;
}

.palette-generator-swatch-tone-light .palette-generator-swatch-action:hover {
	background: rgba(255, 255, 255, 0.4);
	color: #1a1a1a;
}

.palette-generator-swatch-tone-light .palette-generator-swatch-action:hover .palette-generator-swatch-contrast-item .check,
.palette-generator-swatch-tone-light .palette-generator-swatch-action:hover .palette-generator-swatch-contrast-item .fail {
	color: inherit;
}

.palette-generator-swatch-tone-light .palette-generator-swatch-action[data-action="remove"]:hover {
	background: rgba(255, 255, 255, 0.45);
	color: #1a1a1a;
}

.palette-generator-swatch-action[data-action="remove"] {
	background: transparent;
}

/* Com apenas 2 tons, esconder o botão Remover (mínimo 2 divs) */
#palette-generator-strip:has(.palette-generator-swatch:nth-child(2):last-child) .palette-generator-swatch-action[data-action="remove"] {
	display: none !important;
}

/* Botão só com ícone: tooltip no hover */
.palette-generator-swatch-action-icon-only {
	position: relative;
	padding: 0.525rem;
}

.palette-generator-swatch-action-icon-only svg {
	width: 21px;
	height: 21px;
	display: block;
}

/* Botão bloqueio: ícones alternados (cadeado aberto/fechado) */
.palette-generator-swatch-action-icon-only[data-action="lock"] .lock-icon {
	display: block;
}
.palette-generator-swatch-action-icon-only[data-action="lock"] .lock-icon svg {
	width: 21px;
	height: 21px;
	display: block;
}

.palette-generator-swatch-tooltip {
	position: absolute;
	left: 50%;
	bottom: 100%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	padding: 4px 8px;
	background: #000;
	color: #fff;
	font-size: 0.7rem;
	white-space: nowrap;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	pointer-events: none;
}

.palette-generator-swatch-action-icon-only:hover .palette-generator-swatch-tooltip {
	opacity: 1;
	visibility: visible;
}

/* Modal de contraste (abre ao clicar no ícone Checar Contraste) */
.palette-generator-contrast-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

.palette-generator-contrast-modal.is-open {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
}

.palette-generator-contrast-modal-backdrop {
	position: absolute;
	inset: 0;
	background: transparent;
	cursor: default;
}

.palette-generator-contrast-modal-content {
	position: fixed;
	width: 200px;
	padding: 0.75rem 1rem;
	background: #1a1a1a;
	color: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	font-size: 0.8rem;
	z-index: 1;
}

.palette-generator-contrast-modal-title {
	font-weight: 600;
	margin-bottom: 0.5rem;
	padding-bottom: 0.35rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.palette-generator-contrast-modal-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.35rem;
}

.palette-generator-contrast-modal-row .check {
	color: #86efac;
	font-weight: bold;
}

.palette-generator-contrast-modal-row .fail {
	color: #fca5a5;
	font-weight: bold;
}

/* HEX abaixo do swatch (clicável para abrir o color picker) */
.palette-generator-swatch-hex-wrap {
	position: absolute;
	bottom: 1.85rem;
	left: 0;
	right: 0;
	text-align: center;
	display: block;
	z-index: 15;
}

.palette-generator-swatch-hex {
	display: inline-block;
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-size: var(--palette-hex-font-size, 1.75rem);
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	padding: 0.35rem 0.5rem;
	border-radius: 6px;
	transition: background 0.15s ease, color 0.15s ease;
}

.palette-generator-swatch-hex.text-dark {
	color: #1a1a1a;
}

.palette-generator-swatch-hex.text-light {
	color: #fff;
}

/* Hover no HEX: mesmo efeito dos botões do menu (contraste por tom) */
.palette-generator-swatch-tone-dark .palette-generator-swatch-hex:hover {
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
}

.palette-generator-swatch-tone-light .palette-generator-swatch-hex:hover {
	background: rgba(255, 255, 255, 0.4);
	color: #1a1a1a;
}

/* Tooltip "Mudar Cor" no hover do HEX */
.palette-generator-swatch-hex-tooltip {
	position: absolute;
	left: 50%;
	bottom: 100%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	padding: 4px 8px;
	background: #000;
	color: #fff;
	font-size: 0.7rem;
	white-space: nowrap;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	pointer-events: none;
	z-index: 100;
}

.palette-generator-swatch-hex-wrap:hover .palette-generator-swatch-hex-tooltip {
	opacity: 1;
	visibility: visible;
}

/* Rodapé do gerador: oculto no desktop (sem espaço), visível no mobile */
.palette-generator-footer {
	display: none;
}

.palette-generator-btn {
	display: none;
	padding: 0.6rem 1.5rem;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: var(--color-bg, #fff);
	color: var(--color-text, #1a1a1a);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

@media (max-width: 768px) {
	.palette-generator-footer {
		display: flex;
		justify-content: flex-start;
		margin: 0;
		padding: calc(var(--space-md, 1rem) - 3.5px) 0;
		padding-left: var(--space-md, 1rem);
	}

	.palette-generator-btn {
		display: inline-block;
	}
}

.palette-generator-btn:hover {
	background: rgba(0, 0, 0, 0.04);
	border-color: rgba(0, 0, 0, 0.25);
	color: var(--color-text, #1a1a1a);
}

.palette-generator-btn:active {
	transform: scale(0.98);
}

/* Botão Exportar no footer (só mobile): mesmo estilo do Gerar, só ícone */
.palette-generator-footer-export-btn {
	display: none;
}

.palette-generator-footer-export-icon {
	display: block;
}

@media (max-width: 768px) {
	.palette-generator-footer {
		justify-content: space-between;
		padding-left: var(--space-md, 1rem);
		padding-right: var(--space-md, 1rem);
	}

	.palette-generator-footer-export-btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0.6rem 1rem;
		font-size: 1rem;
		font-weight: 600;
		border-radius: 8px;
		border: 1px solid rgba(0, 0, 0, 0.15);
		background: var(--color-bg, #fff);
		color: var(--color-text, #1a1a1a);
		cursor: pointer;
		transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
	}

	.palette-generator-footer-export-btn:hover {
		background: rgba(0, 0, 0, 0.04);
		border-color: rgba(0, 0, 0, 0.25);
		color: var(--color-text, #1a1a1a);
	}

	.palette-generator-footer-export-btn:active {
		transform: scale(0.98);
	}
}

/* Sombras inline (dentro do swatch) */
.palette-generator-shades-inline {
	position: absolute;
	inset: 0;
	z-index: 15;
	display: flex;
	flex-direction: column;
	background: rgba(0, 0, 0, 0.92);
	border-radius: 0;
	overflow: hidden;
}

.palette-generator-shades-inline-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.palette-generator-shades-inline-close:hover {
	background: rgba(255, 255, 255, 0.35);
}

.palette-generator-shades-inline-strip {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.palette-generator-shades-inline-strip .palette-generator-shades-swatch {
	flex: 1;
	min-height: 0;
}

/* Ponto do tom alvo (igual ao .gradient-dot da página de cor) */
.palette-generator-shades-inline-target-dot {
	position: absolute;
	width: 10px;
	height: 10px;
	left: 50%;
	transform: translateX(-50%);
	background-color: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	z-index: 3;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.3s ease;
}

/* Esconde o ponto ao passar o mouse no tom alvo (posição 18) */
.palette-generator-shades-inline:has(.palette-generator-shades-inline-strip .palette-generator-shades-swatch:nth-child(18):hover) .palette-generator-shades-inline-target-dot {
	opacity: 0;
}

/* Modal Sombras (34 shades) - não usado; sombras abrem dentro do swatch */
.palette-generator-shades-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.palette-generator-shades-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.palette-generator-shades-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.palette-generator-shades-content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 100%;
	overflow: hidden;
}

.palette-generator-shades-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.palette-generator-shades-close:hover {
	background: rgba(0, 0, 0, 0.8);
}

.palette-generator-shades-strip {
	display: flex;
	flex-direction: column;
	width: 240px;
	max-height: 70vh;
	overflow-y: auto;
}

.palette-generator-shades-swatch {
	height: 28px;
	min-height: 28px;
	flex-shrink: 0;
	cursor: pointer;
	position: relative;
}

.palette-generator-shades-swatch:hover {
	opacity: 1;
}

.palette-generator-shades-swatch[data-hex]::after {
	content: attr(data-hex);
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 0.7rem;
	font-family: var(--font-base, 'Inter'), system-ui, sans-serif;
	font-weight: 600;
	padding: 0;
	pointer-events: none;
	white-space: nowrap;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.palette-generator-shades-swatch[data-hex]:hover::after {
	opacity: 1;
}

/* Cor do código por contraste com o fundo do tom (branco ou preto) */
.palette-generator-shades-inline-strip .palette-generator-shades-swatch.shades-swatch-text-light[data-hex]::after {
	color: #fff;
}

.palette-generator-shades-inline-strip .palette-generator-shades-swatch.shades-swatch-text-dark[data-hex]::after {
	color: #1a1a1a;
}

.palette-generator-shades-target-dot {
	position: absolute;
	width: 8px;
	height: 8px;
	background: #fff;
	border: 2px solid #333;
	border-radius: 50%;
	pointer-events: none;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	box-shadow: 0 0 0 1px rgba(255,255,255,0.8);
}

/* Modal Informações da Cor */
.palette-generator-color-info-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.palette-generator-color-info-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.palette-generator-color-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 10001;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}
.palette-generator-color-fullscreen.is-open {
	opacity: 1;
	visibility: visible;
}
.palette-generator-color-fullscreen-swatch {
	position: absolute;
	inset: 0;
}
.palette-generator-color-fullscreen-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.palette-generator-color-fullscreen-close:hover {
	background: rgba(255, 255, 255, 0.35);
}
.palette-generator-color-fullscreen-close svg {
	width: 24px;
	height: 24px;
}

.palette-generator-color-info-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	cursor: pointer;
}

.palette-generator-color-info-content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	max-width: 420px;
	width: 100%;
	max-height: 85vh;
	overflow: visible;
	display: flex;
	flex-direction: column;
}

.palette-generator-color-info-actions-btn {
	position: absolute;
	top: 0.5rem;
	right: 48px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.1);
	color: #1a1a1a;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, width 0.2s ease, height 0.2s ease, top 0.2s ease, right 0.2s ease;
}
.palette-generator-color-info-actions-btn svg {
	width: 18px;
	height: 18px;
}
.palette-generator-color-info-actions-btn:hover {
	background: rgba(0, 0, 0, 0.15);
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-dark .palette-generator-color-info-actions-btn {
	color: #fff;
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-dark .palette-generator-color-info-actions-btn:hover {
	background: rgba(255, 255, 255, 0.2);
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-light .palette-generator-color-info-actions-btn {
	color: #1a1a1a;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-actions-btn {
	width: 28px;
	height: 28px;
	top: 0.35rem;
	right: 40px;
	border-radius: 6px;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-actions-btn svg {
	width: 16px;
	height: 16px;
}

.palette-generator-color-info-actions-menu {
	position: absolute;
	top: calc(0.5rem + 36px + 4px);
	right: 48px;
	z-index: 3;
	width: 201px;
	min-width: 201px;
	max-width: 201px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(0, 0, 0, 0.08);
	padding: 0.35rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.palette-generator-color-info-actions-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-actions-menu {
	top: calc(0.35rem + 28px + 4px);
	right: 40px;
}

.palette-generator-color-info-action-item {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	color: #1a1a1a;
	cursor: pointer;
	transition: background 0.1s ease;
	position: relative;
}
.palette-generator-color-info-action-item:hover {
	background: rgba(0, 0, 0, 0.06);
}
.palette-generator-color-info-action-item svg {
	flex-shrink: 0;
}
.palette-generator-color-info-action-item.has-submenu .submenu-arrow {
	margin-left: auto;
}
.palette-generator-color-info-action-submenu {
	position: absolute;
	left: 100%;
	top: 0;
	margin-left: 2px;
	min-width: 140px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(0, 0, 0, 0.08);
	padding: 0.35rem 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}
.palette-generator-color-info-action-item.has-submenu:hover .palette-generator-color-info-action-submenu {
	opacity: 1;
	visibility: visible;
}
.palette-generator-color-info-action-subitem {
	padding: 0.4rem 1rem;
	font-size: 0.85rem;
	color: #1a1a1a;
	cursor: pointer;
	transition: background 0.1s ease;
}
.palette-generator-color-info-action-subitem:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* Mobile: menu de ações e submenu como bottom sheet (abrem de baixo para cima) */
@media (max-width: 768px) {
	.palette-generator-color-info-modal .palette-generator-color-info-actions-menu {
		position: fixed;
		top: auto;
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		z-index: 10001;
		border-radius: 12px 12px 0 0;
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
		padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
		opacity: 1;
		visibility: hidden;
		transform: translateY(100%);
		transition: visibility 0.25s ease, transform 0.3s ease;
	}
	.palette-generator-color-info-modal .palette-generator-color-info-actions-menu.is-open {
		visibility: visible;
		transform: translateY(0);
	}
	.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-actions-menu {
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
	}

	.palette-generator-color-info-modal .palette-generator-color-info-action-submenu {
		position: fixed;
		left: 0;
		right: 0;
		top: auto;
		bottom: 0;
		margin-left: 0;
		min-width: 0;
		width: 100%;
		max-height: 70vh;
		overflow-y: auto;
		border-radius: 12px 12px 0 0;
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
		padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
		opacity: 0;
		visibility: hidden;
		transform: translateY(100%);
		transition: visibility 0.25s ease, transform 0.3s ease;
		z-index: 10002;
	}
	/* No mobile o submenu só abre no clique; quando .is-open, fica visível mesmo com hover no item (evita sumir após o toque) */
	.palette-generator-color-info-modal .palette-generator-color-info-action-submenu:not(.is-open) {
		opacity: 0 !important;
		visibility: hidden !important;
		transform: translateY(100%) !important;
	}
	.palette-generator-color-info-modal .palette-generator-color-info-action-submenu.is-open {
		opacity: 1 !important;
		visibility: visible !important;
		transform: translateY(0) !important;
	}
	/* Não esconder pelo hover no mobile (hover vindo do toque conflita com .is-open) */
	.palette-generator-color-info-modal .palette-generator-color-info-action-item.has-submenu:hover .palette-generator-color-info-action-submenu.is-open {
		opacity: 1 !important;
		visibility: visible !important;
		transform: translateY(0) !important;
	}
}

.palette-generator-color-info-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.1);
	color: #1a1a1a;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease, width 0.2s ease, height 0.2s ease, top 0.2s ease, right 0.2s ease;
}
.palette-generator-color-info-close svg {
	width: 24px;
	height: 24px;
	transition: width 0.2s ease, height 0.2s ease;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-close {
	width: 28px;
	height: 28px;
	top: 0.35rem;
	right: 0.35rem;
	border-radius: 6px;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-close svg {
	width: 18px;
	height: 18px;
}

.palette-generator-color-info-close:hover {
	background: rgba(0, 0, 0, 0.15);
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-dark .palette-generator-color-info-close {
	color: #fff;
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-dark .palette-generator-color-info-close:hover {
	background: rgba(255, 255, 255, 0.2);
}
.palette-generator-color-info-content.palette-generator-color-info-header-tone-light .palette-generator-color-info-close {
	color: #1a1a1a;
}

.palette-generator-color-info-content {
	max-width: 520px;
}

.palette-generator-color-info-body {
	padding: 0;
	overflow-y: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.palette-generator-color-info-body::-webkit-scrollbar {
	display: none;
}

.palette-generator-color-info-body .palette-generator-color-info-loading {
	margin: 0;
	padding: 1.5rem;
	color: #666;
}

/* Inner wrapper (header + seções + CTA) */
.palette-generator-color-info-inner {
	display: flex;
	flex-direction: column;
}

/* Print1: faixa do topo com nome/HEX (fundo = cor) — sticky ao rolar */
.palette-generator-color-info-header {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 1rem 1.25rem;
	min-height: 52px;
	box-sizing: border-box;
	transition: min-height 0.2s ease, padding 0.2s ease;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-header {
	min-height: 40px;
	padding: 0.5rem 1rem 0.5rem 1.25rem;
}
.palette-generator-color-info-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	transition: font-size 0.2s ease;
}
.palette-generator-color-info-header-tone-dark .palette-generator-color-info-title {
	color: #fff;
}
.palette-generator-color-info-header-tone-light .palette-generator-color-info-title {
	color: #1a1a1a;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-title {
	font-size: 1.05rem;
}
.palette-generator-color-info-hex {
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
	transition: font-size 0.2s ease;
}
.palette-generator-color-info-header-tone-dark .palette-generator-color-info-hex {
	color: #fff;
}
.palette-generator-color-info-header-tone-light .palette-generator-color-info-hex {
	color: #333;
}
.palette-generator-color-info-content.modal-scrolled .palette-generator-color-info-hex {
	font-size: 0.95rem;
}

/* Seções (Conversão, Harmonias, Tons, Relacionadas, Acessibilidade) */
.palette-generator-color-info-section {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid rgba(0,0,0,0.06);
}
.palette-generator-color-info-section:last-of-type {
	border-bottom: none;
}
.palette-generator-color-info-section-title {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
	color: #1a1a1a;
}

/* Conversão: grid de itens */
.palette-generator-color-info-conversion {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem 1rem;
}
.palette-generator-color-info-conv-item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.5rem 0.6rem;
	background: rgba(0,0,0,0.04);
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}
.palette-generator-color-info-conv-item:hover {
	background: rgba(0,0,0,0.09);
}
.palette-generator-copy-icon-hover {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
	border-radius: 6px;
	color: #1a1a1a;
}
.palette-generator-color-info-conv-item .palette-generator-copy-icon-hover {
	align-items: flex-start;
	justify-content: flex-end;
	padding: 0.35rem 0.4rem 0 0;
}
.palette-generator-copy-icon-hover svg {
	width: 20px;
	height: 20px;
}
.palette-generator-color-info-conv-item:hover .palette-generator-copy-icon-hover {
	opacity: 1;
}
.palette-generator-copy-icon-hover--dark {
	background: rgba(0,0,0,0.4);
	color: #fff;
}
.palette-generator-color-info-harmony-swatch .palette-generator-copy-icon-hover--harmony {
	background: transparent;
	color: #fff;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.palette-generator-color-info-shade .palette-generator-copy-icon-hover--dark,
.palette-generator-color-info-related-swatch .palette-generator-copy-icon-hover--dark {
	background: transparent;
	color: #fff;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.palette-generator-color-info-harmony-swatch,
.palette-generator-color-info-shade,
.palette-generator-color-info-related-swatch {
	position: relative;
}
.palette-generator-harmony-hex-tooltip {
	position: absolute;
	left: 50%;
	bottom: 100%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	padding: 5px 8px;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.7rem;
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-weight: 600;
	white-space: nowrap;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
	z-index: 2;
}
.palette-generator-color-info-harmony-swatch:hover .palette-generator-harmony-hex-tooltip {
	opacity: 1;
	visibility: visible;
}
.palette-generator-color-info-harmony-swatch .palette-generator-copy-icon-hover,
.palette-generator-color-info-shade .palette-generator-copy-icon-hover,
.palette-generator-color-info-related-swatch .palette-generator-copy-icon-hover {
	border-radius: 4px;
}
.palette-generator-color-info-harmony-swatch .palette-generator-copy-icon-hover svg,
.palette-generator-color-info-shade .palette-generator-copy-icon-hover svg,
.palette-generator-color-info-related-swatch .palette-generator-copy-icon-hover svg {
	width: 14px;
	height: 14px;
}
.palette-generator-color-info-harmony-swatch:hover .palette-generator-copy-icon-hover,
.palette-generator-color-info-shade:hover .palette-generator-copy-icon-hover,
.palette-generator-color-info-related-swatch:hover .palette-generator-copy-icon-hover {
	opacity: 1;
}
.palette-generator-color-info-conv-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #555;
}
.palette-generator-color-info-conv-value {
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-size: 0.85rem;
	color: #1a1a1a;
}

/* Harmonias: cards com swatches */
.palette-generator-color-info-harmonies {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6rem;
}
.palette-generator-color-info-harmony-card {
	padding: 0.5rem 0.6rem;
	background: rgba(0,0,0,0.04);
	border-radius: 6px;
}
.palette-generator-color-info-harmony-label {
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 0.4rem;
	color: #333;
}
.palette-generator-color-info-harmony-swatches {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
}
.palette-generator-color-info-harmony-swatch {
	display: inline-block;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	flex-shrink: 0;
	border: 1px solid rgba(0,0,0,0.1);
	cursor: pointer;
}

/* Tons: faixa horizontal de quadrados (centralizada) */
.palette-generator-color-info-shades {
	display: flex;
	gap: 2px;
	flex-wrap: wrap;
	justify-content: center;
}
.palette-generator-color-info-shade {
	width: 28px;
	height: 28px;
	border-radius: 4px;
	flex-shrink: 0;
	border: 1px solid rgba(0,0,0,0.08);
	cursor: pointer;
}

.palette-generator-color-info-shade-tooltip {
	position: fixed;
	z-index: 10002;
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	background: #1a1a1a;
	color: #fff;
	border-radius: 6px;
	font-size: 0.75rem;
	line-height: 1.3;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0,0,0,0.25);
	pointer-events: none;
}
.palette-generator-color-info-shade-tooltip.is-visible {
	display: flex;
}
.palette-generator-color-info-shade-tooltip-hex {
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-weight: 600;
}
.palette-generator-color-info-shade-tooltip-scale {
	margin-top: 2px;
	opacity: 0.9;
}

/* Cores Relacionadas: 4 cards (2x2) */
.palette-generator-color-info-related {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6rem;
}
.palette-generator-color-info-related-card {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.6rem;
	background: rgba(0,0,0,0.04);
	border-radius: 6px;
	position: relative;
}
.palette-generator-color-info-related-actions-btn {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease, background 0.2s ease;
}
.palette-generator-color-info-related-card:hover .palette-generator-color-info-related-actions-btn {
	opacity: 1;
}
.palette-generator-color-info-related-actions-btn:hover {
	background: rgba(0, 0, 0, 0.1);
}
.palette-generator-color-info-related-actions-btn svg {
	width: 14px;
	height: 14px;
}
.palette-generator-color-info-related-swatch {
	width: 32px;
	height: 32px;
	border-radius: 6px;
	flex-shrink: 0;
	border: 1px solid rgba(0,0,0,0.1);
}
.palette-generator-color-info-related-name {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a1a1a;
}
.palette-generator-color-info-related-swatch {
	cursor: pointer;
}

/* Acessibilidade: linha em retângulo cinza claro; ratio em retângulo branco */
.palette-generator-color-info-accessibility {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}
.palette-generator-color-info-a11y-row {
	display: grid;
	grid-template-columns: 1fr 72px 1fr;
	align-items: center;
	gap: 0.75rem;
	background: rgba(0, 0, 0, 0.06);
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
}
.palette-generator-color-info-a11y-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: #1a1a1a;
}
.palette-generator-color-info-a11y-ratio-box {
	background: #fff;
	border-radius: 6px;
	padding: 0.25rem 0.5rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	width: 72px;
	min-width: 72px;
	text-align: center;
	box-sizing: border-box;
	justify-self: center;
}
.palette-generator-color-info-a11y-ratio {
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-size: 0.9rem;
	color: #1a1a1a;
}
.palette-generator-color-info-a11y-pill {
	justify-self: end;
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
/* Mesmas cores da página da cor (section-contraste) */
.palette-generator-color-info-a11y-pill--1,
.palette-generator-color-info-a11y-pill--2 {
	background-color: #fef2f2;
	color: #dc2626;
}
.palette-generator-color-info-a11y-pill--3,
.palette-generator-color-info-a11y-pill--4 {
	background-color: #fffbeb;
	color: #d97706;
}
.palette-generator-color-info-a11y-pill--5 {
	background-color: #f0fdf4;
	color: #16a34a;
}

/* Botão "Veja mais sobre esta cor" (Print4) */
.palette-generator-color-info-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 1rem 1.25rem 1.25rem;
	padding: 0.85rem 1.25rem;
	background: rgba(0,0,0,0.06);
	color: #1a1a1a;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 8px;
	transition: background 0.2s ease, color 0.2s ease;
}
.palette-generator-color-info-cta:hover {
	background: rgba(0,0,0,0.1);
	color: #1a1a1a;
}

.palette-generator-color-info-body .color-info-hex {
	font-family: var(--font-base, 'Inter', system-ui, sans-serif);
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.palette-generator-color-info-body .color-info-title {
	font-size: 1.1rem;
	margin: 0 0 0.75rem;
}

.palette-generator-color-info-body .color-info-dl {
	margin: 0;
}

.palette-generator-color-info-body .color-info-dl dt {
	font-weight: 600;
	margin-top: 0.5rem;
}

.palette-generator-color-info-body .color-info-dl dd {
	margin: 0.25rem 0 0;
}

.palette-generator-color-info-body .color-info-link {
	display: inline-block;
	margin-top: 1rem;
}

.palette-generator-color-info-body .color-info-not-found {
	color: #666;
	margin: 0;
}

/* Modal Exportar cor como imagem (mesmo molde da página da cor) */
.palette-generator-export-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.7);
	opacity: 0;
	transition: opacity 0.3s ease;
	align-items: center;
	justify-content: center;
}

.palette-generator-export-modal.is-open {
	display: flex;
	opacity: 1;
}

.palette-generator-export-modal-content {
	background: #fff;
	border-radius: var(--radius-lg, 12px);
	padding: var(--space-xl, 1.5rem);
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
	.palette-generator-export-modal {
		align-items: flex-end;
		justify-content: flex-end;
	}
	.palette-generator-export-modal-content {
		width: 100%;
		max-width: 100%;
		max-height: 85vh;
		border-radius: 12px 12px 0 0;
		box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
		padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
		transform: translateY(100%);
		transition: transform 0.3s ease;
	}
	.palette-generator-export-modal.is-open .palette-generator-export-modal-content {
		transform: translateY(0);
	}
}

.palette-generator-export-modal-content h3 {
	margin: 0 0 var(--space-lg, 1.25rem) 0;
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--color-text, #1a1a1a);
}

.palette-generator-export-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-md, 1rem);
}

.palette-generator-export-field {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs, 0.25rem);
}

.palette-generator-export-field label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--color-text, #1a1a1a);
}

.palette-generator-export-field input,
.palette-generator-export-field select {
	padding: var(--space-sm, 0.5rem) var(--space-md, 1rem);
	border: 1px solid #ddd;
	border-radius: var(--radius-sm, 6px);
	font-size: 1rem;
	font-family: inherit;
}

.palette-generator-export-field input:focus,
.palette-generator-export-field select:focus {
	outline: none;
	border-color: var(--color-link, #2563eb);
}

.palette-generator-export-actions {
	display: flex;
	gap: var(--space-md, 1rem);
	justify-content: flex-end;
	margin-top: var(--space-md, 1rem);
}

.palette-generator-export-cancel-btn,
.palette-generator-export-generate-btn {
	padding: var(--space-sm, 0.5rem) var(--space-lg, 1.5rem);
	border-radius: var(--radius-md, 8px);
	border: none;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	transition: all 0.3s ease;
}

.palette-generator-export-cancel-btn {
	background: #f5f5f5;
	color: var(--color-text, #1a1a1a);
}

.palette-generator-export-cancel-btn:hover {
	background: #e5e5e5;
}

.palette-generator-export-generate-btn {
	background: #2563eb;
	color: #fff;
}

.palette-generator-export-generate-btn:hover {
	background: #1d4ed8;
}

/* ========== Modal Visualização Rápida ========== */
.palette-generator-quickview-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--space-md, 1rem);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.palette-generator-quickview-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.palette-generator-quickview-modal[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

.palette-generator-quickview-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.palette-generator-quickview-content {
	position: relative;
	width: 100%;
	max-width: 420px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
}

.palette-generator-quickview-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.palette-generator-quickview-title {
	position: absolute;
	left: 0;
	right: 0;
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--color-text, #1a1a1a);
	text-align: center;
	pointer-events: none;
}

.palette-generator-quickview-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--color-text, #1a1a1a);
	cursor: pointer;
	border-radius: 8px;
	transition: background 0.2s ease;
}

.palette-generator-quickview-close:hover {
	background: rgba(0, 0, 0, 0.06);
}

.palette-generator-quickview-codes {
	flex: 1;
	min-height: 200px;
	padding: 24px 16px;
	display: flex;
	flex-direction: column;
	transition: background-color 0.2s ease;
}

.palette-generator-quickview-codes-light .palette-generator-quickview-code-label,
.palette-generator-quickview-codes-light .palette-generator-quickview-code-value,
.palette-generator-quickview-codes-light .palette-generator-quickview-color-name {
	color: #1a1a1a;
}

.palette-generator-quickview-codes-light .palette-generator-quickview-code-label {
	opacity: 0.7;
}

.palette-generator-quickview-codes-dark .palette-generator-quickview-code-label,
.palette-generator-quickview-codes-dark .palette-generator-quickview-code-value,
.palette-generator-quickview-codes-dark .palette-generator-quickview-color-name {
	color: #fff;
}

.palette-generator-quickview-codes-dark .palette-generator-quickview-code-label {
	opacity: 0.85;
}

.palette-generator-quickview-color-name {
	margin: 0 0 12px 0;
	font-size: 0.95rem;
	font-weight: 600;
	opacity: 0.9;
}

.palette-generator-quickview-codes-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.palette-generator-quickview-code-row {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	cursor: pointer;
	padding: 6px 0 6px 20px;
	border-radius: 6px;
	transition: background 0.15s ease;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
}

.palette-generator-quickview-copy-icon {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
}

.palette-generator-quickview-copy-icon svg {
	width: 100%;
	height: 100%;
}

.palette-generator-quickview-code-row:hover .palette-generator-quickview-copy-icon {
	opacity: 1;
}

.palette-generator-quickview-codes-dark .palette-generator-quickview-copy-icon {
	color: #fff;
}

.palette-generator-quickview-codes-light .palette-generator-quickview-copy-icon {
	color: #1a1a1a;
}

.palette-generator-quickview-code-row:hover {
	background: rgba(255, 255, 255, 0.15);
}

.palette-generator-quickview-code-row:active {
	background: rgba(255, 255, 255, 0.2);
}

.palette-generator-quickview-code-label {
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.85;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.palette-generator-quickview-code-value {
	font-size: 1rem;
	font-weight: 700;
}

.palette-generator-quickview-strip-wrap {
	padding: 16px 20px 20px;
	background: #fff;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
}

.palette-generator-quickview-strip {
	display: flex;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	min-height: 48px;
}

.palette-generator-quickview-swatch {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 48px;
	cursor: pointer;
}

.palette-generator-quickview-swatch-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.palette-generator-quickview-swatch.is-selected .palette-generator-quickview-swatch-dot {
	opacity: 1;
}
