/* Keep the existing enlarged logo in exactly the same place while it rotates.
   Independent rotate never replaces its scale/translation. */
:is(.brand-logo, .portal-logo, .about-logo, .legal-brand img) {
    transform: none;
    translate: 5% 0;
    scale: 1.1;
    rotate: 0deg;
    transform-origin: 50% 50%;
}
@keyframes hx-header-working { from { rotate: 0deg; } to { rotate: 360deg; } }
.hx-is-working :is(.brand-logo, .portal-logo, .about-logo, .legal-brand img) {
    animation: hx-header-working .8s linear infinite;
    will-change: rotate;
}
.portal-loading-card { grid-template-columns: minmax(0, 1fr); }
.portal-dashboard-loading { backdrop-filter: none; background: transparent; }
.weather-lab-loading .portal-loading-progress { width: min(18rem, 100%); }
.weather-lab-loading .portal-loading-progress { height: 4px; overflow: hidden; border-radius: 4px; background: #dde8ed; }
.weather-lab-loading .portal-loading-progress span { display: block; width: 35%; height: 100%; background: #267faf; animation: hx-lab-progress 1.4s ease-in-out infinite alternate; }
@keyframes hx-lab-progress { from { transform: translateX(-40%); } to { transform: translateX(225%); } }
.weather-lab-environment-state-editor { min-width: 0; padding: 0; margin: 0; border: 0; }
.weather-lab-environment-state-row.is-source-locked { background: linear-gradient(110deg, #e5e9e9 50%, #e2efe7 50%); }
.weather-lab-environment-state-editor:disabled { opacity: .67; }
.weather-lab-environment-state-editor > .weather-lab-note { grid-column: 1 / -1; }
.inline-color-suggestion button i { display: inline-block; width: .75rem; height: .75rem; border-radius: 50%; margin-right: .3rem; border: 1px solid #ffffff80; }
.weather-lab-editable-slider { display: grid !important; grid-template-columns: minmax(0, 1fr) 4.5rem !important; gap: .2rem .4rem !important; align-items: center; }
.weather-lab-editable-slider > span:first-child { grid-column: 1 / -1; }
.weather-lab-editable-slider > input[type="range"] { min-width: 0; width: 100%; grid-column: 1; }
.weather-lab-editable-slider > input[type="number"] { width: 100%; min-width: 0; grid-column: 2; padding: .2rem .3rem; }
.weather-lab-threshold-target { display: grid; grid-template-columns: auto minmax(7rem, 1fr); gap: .5rem; align-items: center; max-width: 20rem; }
.weather-lab-threshold-group-grid { align-items: end; }
.weather-lab-appearance-grid > :is(label,div) { min-width: 0; }
.weather-lab-field-reset-host > .weather-lab-category-reset { top: 0; bottom: auto; }
.weather-lab-acquisition-local { grid-template-columns: minmax(0, 1fr); align-items: start; gap: .55rem; }
.weather-lab-acquisition-local .weather-lab-upload { width: 100%; display: flex; flex-direction: row; align-items: center; gap: .45rem; }
.weather-lab-upload > .button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; height: 32px; box-sizing: border-box; padding: .25rem .55rem; white-space: nowrap; }
.weather-lab-upload-status { flex: 1 1 8rem; }
.hx-screen-preview-host { position: relative; }
.hx-screen-preview { display: none; }
@media screen {
    :root:not([data-theme="light"]) .has-screen-preview { visibility: hidden; }
    :root:not([data-theme="light"]) .hx-screen-preview { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
    :root[data-theme="dracula"] .portal-welcome-hero { background: linear-gradient(to right, #263543 0%, #282a36 44%, #282a36 100%); }
    :root[data-theme="dark"] .portal-welcome-hero { background: linear-gradient(to right, #061721 0%, #000 44%, #000 100%); }
    :root:not([data-theme="light"]) .weather-3d-floor { fill: #363b45 !important; }
    :root:not([data-theme="light"]) :is(.weather-source-dialog, .weather-lab-source-dialog, .weather-lab-source-browser) :is(button.is-active, button[aria-selected="true"]) { background: #235b80; color: #fff; }
    :root:not([data-theme="light"]) select option:checked { background: #235b80; color: #fff; }
    :root:not([data-theme="light"]) :is(.weather-provider-tab[aria-pressed="true"], [data-weather-acquisition-mode][aria-pressed="true"]) { background: #235b80 !important; color: #fff !important; }
    :root:not([data-theme="light"]) :is(.weather-provider-tab[aria-pressed="true"], [data-weather-acquisition-mode][aria-pressed="true"]) :is(strong,span,svg) { color: inherit !important; }
    :root:not([data-theme="light"]) .weather-lab-environment-state-row.is-source-locked { background: linear-gradient(110deg, #353b41 50%, #254638 50%); }
}
@media (prefers-reduced-motion: reduce) {
    .hx-is-working :is(.brand-logo, .portal-logo, .about-logo, .legal-brand img) { animation: none; opacity: .65; }
}
@media screen and (max-width: 1080px) {
    /* In the stacked layout the chart sits below, not to the right of, the copy. */
    :root[data-theme="dracula"] .portal-welcome-hero { background: linear-gradient(to bottom, #263543 0%, #282a36 44%, #282a36 100%); }
    :root[data-theme="dark"] .portal-welcome-hero { background: linear-gradient(to bottom, #061721 0%, #000 44%, #000 100%); }
}
