/**
 * MeteoArt Widget - Settings > MeteoArt Widget page.
 */

.meteo-admin {
	--meteo-accent: #2271b1;
	--meteo-ink: #1d2327;
	--meteo-muted: #646970;
	--meteo-line: #dcdcde;
	max-width: 1180px;
	color: var(--meteo-ink);
}

.meteo-admin * {
	box-sizing: border-box;
}

/* Hero */
.meteo-hero {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 16px 0 20px;
	padding: 24px 28px;
	border-radius: 16px;
	background: linear-gradient(120deg, #0b1f4d 0%, #123a8c 50%, #1f6fd6 100%);
	color: #fff;
	box-shadow: 0 12px 30px -18px rgba(11, 31, 77, .7);
}

.meteo-hero__icon {
	flex: none;
	border-radius: 14px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}

.meteo-hero__text {
	flex: 1;
	min-width: 0;
}

.meteo-hero h2 {
	margin: 0;
	color: #fff;
	font-size: 26px;
	line-height: 1.2;
}

.meteo-hero__version {
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	font-size: 12px;
	font-weight: 600;
	vertical-align: middle;
}

.meteo-hero p {
	margin: 6px 0 0;
	color: #dbe7ff;
	font-size: 14px;
}

.meteo-hero__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Buttons */
.meteo-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.meteo-btn:focus {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--meteo-accent);
	outline: none;
}

.meteo-btn--light {
	background: #fff;
	color: #0b1f4d;
}

.meteo-btn--light:hover {
	background: #eef4ff;
	color: #0b1f4d;
}

.meteo-btn--ghost {
	border-color: rgba(255, 255, 255, .4);
	color: #fff;
}

.meteo-btn--ghost:hover {
	background: rgba(255, 255, 255, .1);
	color: #fff;
}

.meteo-btn--primary {
	background: var(--meteo-accent);
	color: #fff;
}

.meteo-btn--primary:hover {
	background: #135e96;
	color: #fff;
}

.meteo-btn--primary.is-done {
	background: #00a32a;
}

/* Welcome notice */
.meteo-notice {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-left: 4px solid #00a32a;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* Ways to add */
.meteo-ways {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-bottom: 20px;
}

.meteo-way {
	padding: 18px 20px;
	border: 1px solid var(--meteo-line);
	border-radius: 12px;
	background: #fff;
}

.meteo-way__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #eef4ff;
	color: var(--meteo-accent);
	font-size: 20px;
}

.meteo-way h3 {
	margin: 12px 0 6px;
	font-size: 15px;
}

.meteo-way p {
	margin: 0 0 10px;
	color: var(--meteo-muted);
}

.meteo-way a {
	font-weight: 600;
	text-decoration: none;
}

/* Builder */
.meteo-builder {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 20px;
	align-items: start;
}

.meteo-panel {
	padding: 20px 22px;
	border: 1px solid var(--meteo-line);
	border-radius: 12px;
	background: #fff;
}

.meteo-panel h3 {
	margin: 0 0 14px;
	font-size: 16px;
}

.meteo-panel--preview {
	position: sticky;
	top: 46px;
}

.meteo-admin fieldset {
	margin: 0 0 6px;
	padding: 14px 0 4px;
	border: 0;
	border-top: 1px solid var(--meteo-line);
}

.meteo-admin legend {
	padding: 0 8px 0 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #50575e;
}

.meteo-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.meteo-grid-2[hidden] {
	display: none;
}

.meteo-field {
	margin: 0 0 12px;
}

.meteo-field__label {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
}

.meteo-field input[type="text"],
.meteo-field select {
	width: 100%;
	max-width: none;
}

.meteo-field input[type="color"] {
	width: 100%;
	height: 34px;
	padding: 2px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	cursor: pointer;
}

.meteo-range {
	display: flex;
	align-items: center;
	gap: 12px;
}

.meteo-range input {
	flex: 1;
	accent-color: var(--meteo-accent);
}

.meteo-range output {
	min-width: 28px;
	padding: 2px 8px;
	border-radius: 10px;
	background: #f0f0f1;
	font-weight: 600;
	text-align: center;
}

/* Toggles */
.meteo-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}

.meteo-toggle input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.meteo-toggle__track {
	position: relative;
	flex: none;
	width: 36px;
	height: 20px;
	border-radius: 10px;
	background: #c3c4c7;
	transition: background .15s;
}

.meteo-toggle__track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	transition: transform .15s;
}

.meteo-toggle input:checked + .meteo-toggle__track {
	background: var(--meteo-accent);
}

.meteo-toggle input:checked + .meteo-toggle__track::after {
	transform: translateX(16px);
}

.meteo-toggle input:focus-visible + .meteo-toggle__track {
	outline: 2px solid var(--meteo-accent);
	outline-offset: 2px;
}

/* Style picker */
.meteo-themes {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 14px;
}

.meteo-theme {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px;
	border: 1px solid var(--meteo-line);
	border-radius: 10px;
	font-weight: 500;
	cursor: pointer;
}

.meteo-theme input {
	position: absolute;
	opacity: 0;
}

.meteo-theme__swatch {
	width: 100%;
	height: 34px;
	border-radius: 6px;
}

.meteo-theme--auto .meteo-theme__swatch { background: linear-gradient(120deg, #2563d6, #2bb9a9 55%, #eea53a); }
.meteo-theme--dark .meteo-theme__swatch { background: linear-gradient(160deg, #0f172a, #334155); }
.meteo-theme--light .meteo-theme__swatch { background: #fff; box-shadow: inset 0 0 0 1px var(--meteo-line); }
.meteo-theme--custom .meteo-theme__swatch { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); }

.meteo-theme:has(input:checked) {
	border-color: var(--meteo-accent);
	box-shadow: 0 0 0 1px var(--meteo-accent);
}

.meteo-theme:has(input:focus-visible) {
	outline: 2px solid var(--meteo-accent);
	outline-offset: 2px;
}

/* Preview */
.meteo-preview-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.meteo-preview-head h3 {
	margin: 0;
}

.meteo-sizes {
	display: inline-flex;
	padding: 3px;
	border-radius: 8px;
	background: #f0f0f1;
}

.meteo-size {
	padding: 5px 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--meteo-muted);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}

.meteo-size.is-active {
	background: #fff;
	color: var(--meteo-ink);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.meteo-stage {
	display: flex;
	justify-content: center;
	padding: 24px 16px;
	border-radius: 10px;
	background:
		radial-gradient(circle at 1px 1px, #dcdcde 1px, transparent 0) 0 0 / 16px 16px,
		#f6f7f7;
	overflow: hidden;
}

.meteo-stage__frame {
	max-width: 100%;
	transition: width .25s ease;
}

.meteo-stage .meteo-w {
	margin: 0;
}

/* Shortcode */
.meteo-code {
	margin-top: 16px;
	padding: 14px 16px;
	border-radius: 10px;
	background: #0b1220;
	color: #e2e8f0;
}

.meteo-code__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #94a3b8;
}

.meteo-code code {
	display: block;
	padding: 0;
	background: none;
	color: #86efac;
	font-size: 13px;
	line-height: 1.6;
	word-break: break-word;
	user-select: all;
}

.meteo-code__hint {
	margin: 10px 0 0;
	color: #94a3b8;
	font-size: 12px;
}

.meteo-foot {
	margin: 24px 0 8px;
	color: var(--meteo-muted);
	text-align: center;
}

@media (max-width: 960px) {
	.meteo-builder,
	.meteo-ways {
		grid-template-columns: 1fr;
	}

	.meteo-panel--preview {
		position: static;
	}

	.meteo-hero {
		flex-wrap: wrap;
	}
}

@media (max-width: 600px) {
	.meteo-grid-2,
	.meteo-themes {
		grid-template-columns: 1fr 1fr;
	}

	.meteo-hero {
		padding: 18px;
	}
}
