/* Visitor City Weather - Frontend styles v1.1 */

.vcw-widget {
	--vcw-bg: #ffffff;
	--vcw-text: #1a1a2e;
	--vcw-muted: #6b7280;
	--vcw-accent: #0ea5e9;
	--vcw-border: #e5e7eb;
	--vcw-radius: 16px;
	--vcw-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: var(--vcw-bg);
	color: var(--vcw-text);
	border: 1px solid var(--vcw-border);
	border-radius: var(--vcw-radius);
	box-shadow: var(--vcw-shadow);
	padding: 1.25rem 1.5rem;
	max-width: 320px;
	line-height: 1.4;
	box-sizing: border-box;
}

.vcw-widget *,
.vcw-widget *::before,
.vcw-widget *::after {
	box-sizing: border-box;
}

/* Transparent background */
.vcw-widget.vcw-bg-transparent {
	background: transparent !important;
	box-shadow: none;
	border-color: transparent;
}

/* No border / shadow */
.vcw-widget.vcw-no-border {
	border: none;
	box-shadow: none;
}

/* ---------- Normal size (default card) ---------- */
.vcw-header {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.vcw-emoji {
	font-size: 2.75rem;
	line-height: 1;
	flex-shrink: 0;
}

.vcw-main {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.vcw-temp {
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.vcw-desc {
	font-size: 0.95rem;
	color: var(--vcw-muted);
	text-transform: capitalize;
}

.vcw-location {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 0.85rem;
	color: var(--vcw-text);
}

.vcw-pin {
	font-size: 0.95rem;
	opacity: 0.85;
}

.vcw-details {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--vcw-border);
	margin-bottom: 0.65rem;
}

.vcw-detail {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.vcw-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--vcw-muted);
	font-weight: 600;
}

.vcw-value {
	font-size: 0.95rem;
	font-weight: 600;
}

.vcw-attribution {
	font-size: 0.7rem;
	color: var(--vcw-muted);
	text-align: right;
}

.vcw-attribution a {
	color: var(--vcw-muted);
	text-decoration: none;
	border-bottom: 1px dotted currentColor;
}

.vcw-attribution a:hover {
	color: var(--vcw-accent);
}

/* ---------- Compact size (good for sidebars / medium headers) ---------- */
.vcw-widget.vcw-size-compact {
	padding: 0.75rem 1rem;
	max-width: 260px;
}

.vcw-size-compact .vcw-header {
	margin-bottom: 0.4rem;
	gap: 0.65rem;
}

.vcw-size-compact .vcw-emoji {
	font-size: 1.85rem;
}

.vcw-size-compact .vcw-temp {
	font-size: 1.35rem;
}

.vcw-size-compact .vcw-desc {
	font-size: 0.8rem;
}

.vcw-size-compact .vcw-location {
	font-size: 0.8rem;
	margin-bottom: 0;
}

/* ---------- Mini size (single horizontal row – perfect for header bars) ---------- */
.vcw-widget.vcw-size-mini {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem 0.75rem;
	padding: 0.35rem 0.75rem;
	max-width: none;
	width: auto;
	white-space: nowrap;
	font-size: 0.9rem;
	line-height: 1.2;
}

.vcw-size-mini .vcw-emoji {
	font-size: 1.25rem;
	line-height: 1;
}

.vcw-size-mini .vcw-temp {
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.vcw-size-mini .vcw-desc {
	font-size: 0.85rem;
	color: var(--vcw-muted);
	text-transform: capitalize;
}

.vcw-size-mini .vcw-location {
	font-size: 0.85rem;
	font-weight: 500;
	margin: 0;
	gap: 0.25rem;
}

.vcw-size-mini .vcw-pin {
	font-size: 0.8rem;
}

/* Error state */
.vcw-error {
	color: #b91c1c;
	background: #fef2f2;
	border-color: #fecaca;
	font-size: 0.9rem;
	padding: 1rem;
}

/* Dark mode support (respects prefers-color-scheme) – only when no custom text color is set */
@media (prefers-color-scheme: dark) {
	.vcw-widget:not([style*="--vcw-text"]) {
		--vcw-bg: #1e1e2f;
		--vcw-text: #f3f4f6;
		--vcw-muted: #9ca3af;
		--vcw-border: #374151;
		--vcw-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
	}

	.vcw-error {
		color: #fca5a5;
		background: #450a0a;
		border-color: #7f1d1d;
	}
}

/* Force dark variant via class */
.vcw-widget.vcw-dark {
	--vcw-bg: #1e1e2f;
	--vcw-text: #f3f4f6;
	--vcw-muted: #9ca3af;
	--vcw-border: #374151;
	--vcw-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Loading state */
.vcw-widget.vcw-loading-state {
	min-height: 1.5em;
	opacity: 0.85;
}

.vcw-loading {
	font-size: 0.9rem;
	color: var(--vcw-muted);
}

.vcw-error-inline {
	color: #b91c1c;
	font-size: 0.9rem;
}

/* Secondary temperature (e.g. °F next to °C) */
.vcw-temp-alt {
	font-size: 0.65em;
	font-weight: 500;
	opacity: 0.75;
	margin-left: 0.15em;
}

.vcw-size-mini .vcw-temp-alt {
	font-size: 0.8em;
}
