*,
::before,
::after {
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

body {
	text-align: center;
	font-family: monospace;
	overflow: hidden;
	line-height: 1.6;
	font-size: clamp(0.5rem, 0.5rem + 1.5vw, 1.2rem);
}

button {
	border: none;
	background-color: transparent;
	cursor: pointer;
	transition: transform 0.3s ease-in-out;
}

button:hover {
	transform: scale(1.2);
}

header {
	padding: 1rem;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
}

.palette-btn {
	font-size: 1.5rem;
	align-self: flex-start;
}

header p {
	font-weight: bold;
	color: gray;
}

.container {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	height: 80dvh;
	margin-top: auto;
	position: relative;
}

.color {
	height: 100%;
	background-color: transparent;
	border-right: 0.5px solid gainsboro;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.color-picker {
	display: block;
	width: 50px;
	height: 50px;
	opacity: 0;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	z-index: 0;
}
.pcr-button {
	display: none !important;
}

.pcr-app {
	position: absolute !important;
	left: 0% !important;
	top: 0% !important;
	max-width: 20vw !important;
	width: 20vw !important;
}

/* interaction area */
.pcr-app .pcr-interaction {
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 8px !important;
	padding: 12px !important;
}

.pcr-app .pcr-interaction .pcr-type button {
	padding: 4px 12px !important;
	border-radius: 4px !important;
	border: 1px solid #ddd !important;
	background: #f5f5f5 !important;
	color: #666 !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
}

.pcr-app .pcr-interaction .pcr-type button.active {
	background: #4a90e2 !important;
	color: white !important;
	border-color: #4a90e2 !important;
}

.pcr-app .pcr-interaction .pcr-result {
	background: #f8f8f8 !important;
	color: #333 !important;
	border: 2px solid #ddd !important;
	border-radius: 6px !important;
	padding: 8px 10px !important;
	font-family: monospace !important;
	font-size: 14px !important;
	min-width: 100% !important;
	text-align: center !important;
	font-weight: 600 !important;
}

.pcr-app .pcr-interaction .pcr-result:focus {
	outline: none !important;
	border-color: #4a90e2 !important;
	background: white !important;
}

.color .color-details {
	display: none;
	flex-direction: column;
	gap: 1.5rem;
}
.color:hover .color-details {
	display: flex;
}

.copy-btn img,
.lock-btn img {
	width: 24px;
}

.copied {
	visibility: hidden;
	font-weight: bold;
	font-size: 1rem;
}
.is-dark .copied {
	color: white;
}

.is-light .copied {
	color: black;
}

.is-light img {
	filter: invert(0);
}

.is-dark img {
	filter: invert(1) brightness(2);
}

.color-details span {
	font-weight: bold;
	cursor: pointer;
	padding: 0 12px;
	border-radius: 12px;
	transition: background-color 0.3s ease;
	display: inline-block;
}
.is-dark .color-details span:hover {
	background-color: rgba(255, 255, 255, 0.103);
}

.is-light .color-details span:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

.error {
	width: 100vw;
	display: flex;
	justify-content: center;
	align-items: center;
	position: absolute;
	top: 20%;
	pointer-events: none;
	z-index: 10;
}

.error > p {
	display: none;
	color: white;
	background-color: rgba(0, 0, 0, 0.4);
	padding: 0.5rem 0.8rem;
	border-radius: 5px;
}
.demo {
	text-decoration: none;
	color: gray;
	font-weight: 800;
	transition: color 0.2s ease-in-out;
	position: relative;
	top: 10px;
}

.demo:hover {
	color: rgb(160, 178, 195);
}

@media (max-width: 768px) {
	.container {
		grid-template-rows: repeat(5, 1fr);
		grid-template-columns: 1fr;
	}
	.color {
		border-bottom: 0.5px solid gainsboro;
		border-right: none;
	}

	.palette-btn {
		align-self: flex-start;
	}

	.color .color-details {
		flex-direction: row;
	}
	.copy-btn img,
	.lock-btn img {
		width: 18px;
	}

	.copied {
		order: 1;
		font-size: 0.8rem;
	}

	.pcr-app {
		max-width: 50vw !important;
		width: 50vw !important;
		height: 200px !important;
	}

	.pcr-app .pcr-interaction {
		padding: 6px 8px !important;
		gap: 6px !important; 
	}

	.pcr-app .pcr-interaction .pcr-result {
		font-size: 12px !important;
		padding: 6px 8px !important;
		margin-top: 0 !important;
	}

	.pcr-app .pcr-interaction .pcr-type button {
		padding: 3px 8px !important;
		font-size: 9px !important;
	}
	
}
