#wccp-color-selector-wrapper {
	margin: 25px 0;
	padding: 20px;
	background: #ffffff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

#wccp-color-field label {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

#wccp-color-field .required {
	color: #d00;
	margin-left: 3px;
}

#wccp-color-buttons-group {
	display: flex;
	gap: 12px;
	align-items: stretch;
}

button.wccp-color-btn {
	flex: 1;
	padding: 12px 20px;
	border: 2px solid #333;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	min-height: 50px;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

button.wccp-color-btn:hover,
button.wccp-color-btn:active,
button.wccp-color-btn:focus {
	outline: none;
}

.wccp-btn-icon {
	font-size: 18px;
	line-height: 1;
	flex-shrink: 0;
}

.wccp-btn-text {
	line-height: 1;
}

#wccp-white-btn {
	background: #fff !important;
	color: #333 !important;
	opacity: 1;
}

#wccp-white-btn:not(.wccp-inactive) {
	border-color: #d7b300 !important;
	box-shadow: 0px 3px 10px #edcb21;
}

#wccp-white-btn:hover,
#wccp-white-btn:active,
#wccp-white-btn:focus {
	background: #f5f5f5 !important;
	color: #333 !important;
	border-color: #000;
}

#wccp-white-btn.wccp-inactive {
	opacity: 0.4;
	border-color: #999;
	box-shadow: none;
}

#wccp-colored-btn {
	background: #eee;
	color: #333;
	opacity: 1;
}

#wccp-colored-btn.text-dark {
	color: #333 !important;
}

#wccp-colored-btn.text-light {
	color: #fff !important;
}

#wccp-colored-btn.invert {
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#wccp-colored-btn:hover,
#wccp-colored-btn:active,
#wccp-colored-btn:focus {
	border-color: #000;
}

#wccp-colored-btn.wccp-inactive {
	background-color: #f9eed9;
	color: #fff;
	opacity: 0.8;
	/* 0.4; */
	border-color: #5b491e;
	box-shadow: none;
}
#wccp-colored-btn.wccp-inactive:hover {
	background-color: #f2e2c2;
	color: #fff;
}

@media (max-width: 480px) {
	#wccp-color-buttons-group {
		flex-direction: column;
	}

	button.wccp-color-btn {
		min-height: 55px;
	}
}

#wccp-color-popup {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

#wccp-popup-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
}

#wccp-popup-content {
	position: relative;
	background: #fff;
	width: 90%;
	max-width: 1200px;
	max-height: 90vh;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid #ddd;
}

#wccp-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	background: #f5f5f5;
	border-bottom: 1px solid #ddd;
}

#wccp-popup-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #333;
}

#wccp-popup-close {
	background: #fff !important;
	border: 1px solid #ddd !important;
	border-radius: 4px;
	font-size: 24px;
	cursor: pointer;
	color: #333 !important;
	line-height: 1;
	padding: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

#wccp-popup-close:hover,
#wccp-popup-close:active,
#wccp-popup-close:focus {
	background: #f5f5f5 !important;
	border-color: #999 !important;
	color: #333 !important;
	outline: none;
}

#wccp-popup-subtitle {
	padding: 12px 24px;
	background: #fff;
	color: #666;
	font-size: 13px;
	border-bottom: 1px solid #eee;
}

#wccp-popup-filters {
	display: flex;
	gap: 12px;
	padding: 16px 24px;
	background: #fff;
	border-bottom: 1px solid #eee;
	align-items: flex-end;
}

.wccp-filter-group {
	flex: 1;
}

.wccp-filter-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 13px;
	color: #333;
}

.wccp-palette-count {
	font-weight: 400;
	color: #999;
	font-size: 12px;
}

.wccp-select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	color: #333;
	cursor: pointer;
}

.wccp-select:hover {
	border-color: #999;
}

.wccp-select:focus {
	outline: none;
	border-color: #333;
}

.wccp-search-group {
	flex: 0 0 auto;
}

.wccp-search-button {
	padding: 0;
	background: #f5f5f5 !important;
	color: #333 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px;
	cursor: pointer;
	font-size: 18px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wccp-search-button:hover,
.wccp-search-button:active,
.wccp-search-button:focus {
	background: #e5e5e5 !important;
	border-color: #999 !important;
	color: #333 !important;
	outline: none;
}

#wccp-search-bar {
	padding: 16px 24px;
	background: #fff !important;
	border-bottom: 1px solid #eee !important;
	display: flex !important;
	justify-content: center !important;
}

.wccp-search-input-group {
	display: flex !important;
	position: relative !important;
	align-items: stretch !important;
	width: 100% !important;
	max-width: 420px !important;
}

.wccp-search-field {
	flex: 1 1 auto !important;
	padding: 8px 52px 8px 12px !important;
	border: 1px solid #ddd !important;
	border-radius: 4px 0 0 4px !important;
	font-size: 14px !important;
	color: #333 !important;
	background: #fff !important;
	box-sizing: border-box !important;
}

.wccp-search-field:focus {
	outline: none !important;
	border-color: #333 !important;
}

.wccp-search-field::placeholder {
	color: #999;
}

.wccp-search-submit {
	padding: 0 14px !important;
	height: 40px !important;
	background: #333 !important;
	color: #fff !important;
	border: 1px solid #333 !important;
	border-radius: 0 4px 4px 0 !important;
	cursor: pointer !important;
	font-size: 14px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
	transition: background 0.2s ease, border-color 0.2s ease !important;
}

.wccp-search-submit:hover,
.wccp-search-submit:active,
.wccp-search-submit:focus {
	background: #000 !important;
	border-color: #000 !important;
	color: #fff !important;
	outline: none;
}

.wccp-search-clear {
	position: absolute !important;
	right: 58px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 20px !important;
	height: 20px !important;
	border-radius: 50% !important;
	padding: 0 !important;
	background: transparent !important;
	color: #555 !important;
	border: none !important;
	cursor: pointer !important;
	font-size: 12px !important;
	line-height: 1 !important;
	display: none;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.1s ease, color 0.2s ease !important;
}

.wccp-search-clear:hover,
.wccp-search-clear:active,
.wccp-search-clear:focus {
	background: transparent !important;
	color: #222 !important;
	outline: none;
	transform: translateY(-50%) scale(1.05);
}

#wccp-popup-body {
	flex: 1;
	overflow-y: auto;
	padding: 24px;
	background: #f9f9f9;
}

#wccp-popup-body::-webkit-scrollbar {
	width: 10px;
}

#wccp-popup-body::-webkit-scrollbar-track {
	background: #eee;
}

#wccp-popup-body::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 4px;
}

#wccp-popup-body::-webkit-scrollbar-thumb:hover {
	background: #999;
}

.wccp-colors-grid {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.wccp-tonalita-group {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: #fff;
	padding: 20px;
	border-radius: 4px;
	border: 1px solid #ddd;
}

.wccp-tonalita-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	color: #333;
	padding-bottom: 12px;
	border-bottom: 2px solid #ddd;
}

.wccp-tonalita-colors {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 12px;
}

button.wccp-color-item {
	height: 70px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 4px;
	background: #fff;
}

button.wccp-color-item:hover,
button.wccp-color-item:active,
button.wccp-color-item:focus {
	border-color: #333 !important;
	outline: none;
}

.wccp-color-code {
	font-size: 12px;
	font-weight: 600;
	padding: 6px 8px;
	text-align: center;
}

button.wccp-color-item.text-dark .wccp-color-code {
	color: #333;
}

button.wccp-color-item.text-light .wccp-color-code {
	color: #fff;
}

button.wccp-color-item.invert .wccp-color-code {
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.wccp-loading {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.wccp-loading-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #eee;
	border-top-color: #333;
	border-radius: 50%;
	animation: wccp-spin 0.8s linear infinite;
}

@keyframes wccp-spin {
	to {
		transform: rotate(360deg);
	}
}

.wccp-no-results {
	text-align: center;
	padding: 40px 20px;
	color: #999;
	font-size: 14px;
}

@media (max-width: 768px) {
	#wccp-popup-content {
		width: 100%;
		max-width: 100%;
		max-height: 100vh;
		border-radius: 0;
		overflow-y: auto;
	}

	#wccp-popup-header,
	#wccp-popup-subtitle,
	#wccp-popup-filters,
	#wccp-search-bar,
	#wccp-popup-body {
		padding-left: 16px;
		padding-right: 16px;
	}

	#wccp-popup-header h2 {
		font-size: 18px;
	}

	.wccp-tonalita-colors {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	button.wccp-color-item {
		flex: 0 0 calc(33.333% - 8px);
		max-width: calc(33.333% - 8px);
	}
}

@media (max-width: 480px) {
	#wccp-popup-header h2 {
		font-size: 16px;
	}

	#wccp-popup-body {
		padding-top: 16px;
		padding-bottom: 16px;
	}

	.wccp-tonalita-colors {
		gap: 6px;
	}

	button.wccp-color-item {
		height: 56px;
		flex: 0 0 calc(50% - 6px);
		max-width: calc(50% - 6px);
	}
}