/**
 * AnWP SL Kit Demo Bar - Frontend Styles
 *
 * @package AnWP_SL_Kit_Demo_Bar
 * @since   0.1.0
 */

/* Hide until Alpine.js initializes */
[x-cloak] {
	display: none !important;
}

/* ==========================================================================
   Sticky Demo Bar
   ========================================================================== */

.anwp-demo-bar {
	position: sticky;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: linear-gradient(135deg, #11396c 0%, #063887 100%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	padding: 12px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.anwp-demo-bar__container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.anwp-demo-bar__logo {
	flex: 0 0 auto;
}

.anwp-demo-bar__logo img {
	max-height: 40px;
	width: auto;
	display: block;
}

.anwp-demo-bar__message {
	flex: 1 1 auto;
}

.anwp-demo-bar__message strong {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	display: block;
}

.anwp-demo-bar__message span {
	color: rgba(255, 255, 255, 0.9);
	font-size: 13px;
}

.anwp-demo-bar__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.anwp-demo-bar__btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.anwp-demo-bar__btn--primary {
	background: #4CAF50;
	color: #fff;
}

.anwp-demo-bar__btn--primary:hover {
	filter: brightness(1.1);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	color: #fff;
}

.anwp-demo-bar__btn--secondary {
	background: #6b6e6b;
	color: #fff;
}

.anwp-demo-bar__btn--secondary:hover {
	filter: brightness(1.1);
	color: #fff;
}

/* ==========================================================================
   Palette Panel
   ========================================================================== */

.anwp-palette-panel {
	position: relative;
	display: inline-block;
}

.anwp-palette-panel__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: rgba(255, 255, 255, 0.15);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.anwp-palette-panel__toggle:hover,
.anwp-palette-panel__toggle.is-active {
	background: rgba(255, 255, 255, 0.25);
}

.anwp-palette-panel__icon {
	font-size: 20px;
	line-height: 1;
}

.anwp-palette-panel__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 280px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
	z-index: 10000;
	overflow: hidden;
}

.anwp-palette-panel__transition-enter {
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.anwp-palette-panel__transition-leave {
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.anwp-palette-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid #e2e8f0;
	background: #f8fafc;
}

.anwp-palette-panel__title {
	font-weight: 600;
	font-size: 14px;
	color: #1a202c;
}

.anwp-palette-panel__reset {
	padding: 4px 10px;
	background: #e2e8f0;
	border: none;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	color: #4a5568;
	cursor: pointer;
	transition: all 0.2s ease;
}

.anwp-palette-panel__reset:hover:not(:disabled) {
	background: #cbd5e0;
}

.anwp-palette-panel__reset:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.anwp-palette-panel__presets {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid #e2e8f0;
}

.anwp-palette-panel__label {
	font-size: 12px;
	font-weight: 600;
	color: #718096;
	white-space: nowrap;
}

.anwp-palette-panel__select {
	flex: 1;
	padding: 6px 8px;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	cursor: pointer;
}

.anwp-palette-panel__select:focus {
	outline: none;
	border-color: #2b6cb0;
}

.anwp-palette-panel__colors {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	padding: 14px;
}

.anwp-palette-panel__color-item {
	display: flex;
	justify-content: center;
}

.anwp-palette-panel__color-item input[type="color"] {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 2px solid #e2e8f0;
	border-radius: 6px;
	cursor: pointer;
	background: none;
	transition: border-color 0.2s ease;
}

.anwp-palette-panel__color-item input[type="color"]:hover {
	border-color: #a0aec0;
}

.anwp-palette-panel__color-item input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 2px;
}

.anwp-palette-panel__color-item input[type="color"]::-webkit-color-swatch {
	border: none;
	border-radius: 3px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 899px) {
	.anwp-demo-bar__logo {
		display: none;
	}
}

@media (max-width: 699px) {
	.anwp-demo-bar__btn--secondary {
		display: none;
	}
}

@media (max-width: 540px) {
	.anwp-demo-bar__container {
		flex-flow: column;
		text-align: center;
	}

	.anwp-demo-bar__actions {
		margin-bottom: 10px;
	}

	.anwp-demo-bar__message {
		order: -1;
	}

	.anwp-palette-panel__dropdown {
		right: auto;
		left: 50%;
		transform: translateX(-50%);
	}
}
