/* QC Weather Widget — Client Extension globalCSS (PBI 129384 / T45).
   Styles the Doha weather card rendered by qc-weather.js. The markup mirrors
   the live qatarchamber.com "TIE weather widget" (widget-title / weather-wrap /
   weather-icon-and-city / weather-todays-stats / weather-forecast) so the QC
   Home widget reads like the production one. Everything is scoped under
   .qc-weather-widget so the generic tie/weather class names never leak onto the
   rest of the page. Logical properties keep it correct under dir="rtl". */

.qc-weather-widget {
	/* Figma: the whole card is maroon with white text/icons and orange sun
	   accents. The cloud glyphs + stat icons use var(--qc-weather-brand), so
	   pointing it at white recolours them for the maroon surface; the sun disc
	   and rays are hardcoded orange (#f6a623) and stay as designed. */
	--qc-weather-brand: #ffffff;

	background: var(--qc-primary-500, #911731);
	block-size: 100%;
	border: 0;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(29, 29, 27, 0.12);
	box-sizing: border-box;
	color: #ffffff;
	display: flex;
	flex-direction: column;
	font-family: var(--qc-font-family-base, 'Cairo', sans-serif);
	min-block-size: 340px;
	overflow: hidden;
	text-align: center;
}

/* Figma has no "Weather" heading — the card opens straight on the icon +
   temperature. Hide the title bar (the weather-name below keeps its own class). */
.qc-weather-widget .widget-title {
	display: none;
}

.qc-weather-widget * {
	box-sizing: border-box;
}

/* ---- title bar ("Weather") ---- */
.qc-weather-widget .widget-title {
	background-color: transparent;
	border-bottom: 0;
	margin: 0;
	padding: 20px 20px 0;
}

.qc-weather-widget .widget-title .the-subtitle {
	color: var(--qc-weather-brand);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
	padding: 0;
}

/* ---- main body ---- */
.qc-weather-widget .weather-wrap {
	clear: both;
	flex: 1 1 auto;
	line-height: 1;
	overflow: hidden;
	/* PBI 129384: Figma specifies 24px top/bottom (was 15px/20px). */
	padding: 24px 20px;
	text-align: center;
	display: flex;
	align-items: end;
}

.qc-weather-widget .weather-icon-and-city,
.qc-weather-widget .weather-todays-stats {
	display: inline-block;
	padding: 0 10px;
	vertical-align: top;
}

/* big current-conditions icon */
.qc-weather-widget .weather-icon {
	block-size: 0.9em;
	font-size: 76px;
	inline-size: 1em;
	margin: 0 auto 0.1em;
	position: relative;
}

.qc-weather-widget .weather-icon .qc-weather-icon-svg {
	block-size: 100%;
	display: block;
	inline-size: 100%;
}

.qc-weather-widget .weather-name {
	font-size: 30px;
	font-weight: 700;
	padding-block-start: 5px;
	white-space: nowrap;
}

.qc-weather-widget .weather-desc {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	margin-block-start: 6px;
}

.qc-weather-widget .weather-current-temp {
	font-size: 64px;
	font-weight: 700;
	line-height: 1;
}

.qc-weather-widget .weather-current-temp sup {
	font-size: 17px;
	font-weight: 400;
	vertical-align: super;
}

.qc-weather-widget .weather-more-todays-stats {
	font-size: 90%;
	line-height: 1.6;
	padding-block-start: 12px;
	padding-inline-start: 10px;
	text-align: start;
}

.qc-weather-widget .weather-more-todays-stats > div {
	align-items: center;
	color: rgba(255, 255, 255, 0.92);
	display: flex;
	gap: 6px;
	white-space: nowrap;
}

.qc-weather-widget .weather-more-todays-stats svg {
	color: var(--qc-weather-brand);
	flex: 0 0 auto;
}

/* ---- 5-day forecast row ---- */
.qc-weather-widget .weather-forecast {
	border-block-start: 1px solid rgba(255, 255, 255, 0.2);
	clear: both;
	display: table;
	inline-size: 100%;
	margin-block-start: 16px;
	overflow: hidden;
	padding: 18px 6px 0;
	table-layout: fixed;
}

.qc-weather-widget .weather-forecast-day {
	display: table-cell;
	position: relative;
	text-align: center;
	vertical-align: top;
}

.qc-weather-widget .weather-forecast-day .weather-icon {
	font-size: 34px;
	margin-block-end: 4px;
}

.qc-weather-widget .weather-forecast-day-temp {
	font-size: 14px;
	font-weight: 600;
}

.qc-weather-widget .weather-forecast-day-temp sup {
	font-size: 8px;
	padding-inline-start: 2px;
}

.qc-weather-widget .weather-forecast-day-abbr {
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.8em;
	font-weight: 700;
	line-height: 1.4;
	margin-block-start: 3px;
}

/* ---- animated sun rays (echoes the live tie-spin) ---- */
.qc-weather-widget .is-animated .qc-ico-rays {
	animation: qc-weather-spin 9s linear infinite;
	transform-box: fill-box;
	transform-origin: center;
}

.qc-weather-widget .weather-forecast .qc-ico-rays {
	animation: qc-weather-spin 12s linear infinite;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes qc-weather-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.qc-weather-widget .qc-ico-rays {
		animation: none;
	}
}

/* ---- failure fallback (AC-2 / AC-6) ---- */
.qc-weather-widget.qc-weather--error {
	align-items: center;
	justify-content: center;
}

.qc-weather-widget .qc-weather-fallback-text {
	color: rgba(255, 255, 255, 0.85);
	font-size: 16px;
	font-weight: 600;
	margin: 14px 0 0;
	padding: 0 16px;
}

/* ---- responsive ---- */
@media (max-width: 767.98px) {
	.qc-weather-widget {
		min-block-size: 300px;
	}

	.qc-weather-widget .weather-current-temp {
		font-size: 58px;
	}
}

/* Dark mode: the Figma dark frame keeps the weather card MAROON (same as
   light) on the neutral dark section — so no dark override is needed; the
   maroon base with white text/icons reads correctly in both themes. */
