/* Intentional product-level overrides on top of the Silicon UI Kit. */

.rtkids-brand-wordmark {
    color: var(--bs-heading-color, #0b0f19);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
}
.rtkids-brand-wordmark:hover { color: var(--bs-heading-color, #0b0f19); }

:root { --bs-body-font-family: "Google Sans", sans-serif; }
body {
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-variation-settings: "GRAD" 0;
}

.authentication-bg {
    background-color: #f6f8fb;
    background-image: linear-gradient(135deg, #f6f8fb 0%, #eef2f7 100%);
}
.authentication-bg .card {
    border: 0;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.06);
}

/*
 * Google Identity control rendered with the portal's Silicon button
 * (btn btn-outline-secondary) so it shares the theme's typography, sizing,
 * radius, and interaction states with every other action on the page. Only
 * the official multi-color "G" mark keeps Google's brand colors; its sizing
 * and label spacing live here.
 */
.google-g {
    display: inline-flex;
    width: 1.125rem;
    height: 1.125rem;
    margin-right: 0.625rem;
}

.google-g svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Fleet dashboard: restrained light location cards following the approved reference. */
.fleet-dashboard { padding-bottom: 1rem; }
.fleet-page-header { min-height: 2.5rem; }
.fleet-state { min-height: 12rem; }
.fleet-loading-block { height: 7rem; }

.fleet-card-map-region {
    position: relative;
    height: 14rem;
    overflow: hidden;
    background: #f2f4f7;
}
.device-map-background { position: absolute; inset: 0; background: #f2f4f7; pointer-events: none; }
.device-map-background .leaflet-tile-pane { filter: grayscale(0.45) saturate(0.55) brightness(1.06); opacity: 0.78; }
.fleet-map-fade {
    position: absolute;
    z-index: 401;
    right: 0;
    bottom: 0;
    left: 0;
    height: 28%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.82));
    pointer-events: none;
}
.fleet-map-loading,
.fleet-map-unavailable {
    position: absolute;
    z-index: 403;
    bottom: 0.6rem;
    left: 1rem;
    pointer-events: none;
}
.fleet-map-loading i { animation: fleet-map-spin 1.1s linear infinite; }
@keyframes fleet-map-spin { to { transform: rotate(360deg); } }
.fleet-map-pin { position: absolute; z-index: 402; top: 1rem; left: 1rem; }
.fleet-card-controls {
    position: absolute;
    z-index: 402;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.fleet-primary-app { min-height: 1.65rem; margin-top: -0.3rem; position: relative; z-index: 403; }
.fleet-card-map-region .leaflet-control-container { display: none; }
.fleet-detail-map { height: 31rem; min-height: 31rem; background: #eef1f5; }
.fleet-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--si-border-color);
    padding: 0.8rem 0;
}

@media (max-width: 991.98px) {
    .fleet-detail-map { height: 52vh; min-height: 22rem; }
}
@media (max-width: 575.98px) {
    .fleet-card-map-region { height: 12.5rem; }
}

/* Device charts modal: one relative frame hosting the ECharts canvas plus
   the loading/empty/unavailable overlays (VMMPortal trend-frame pattern). */
.device-charts-frame {
    position: relative;
    width: 100%;
    height: 26rem;
    min-height: 26rem;
}
.device-charts-host {
    width: 100%;
    height: 100%;
}
.device-charts-state {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}
.device-charts-state:not(.d-none) {
    display: flex;
}
.device-charts-message p {
    max-width: 28rem;
}

@media (max-width: 575.98px) {
    .device-charts-frame {
        height: 20rem;
        min-height: 20rem;
    }
}

/* Respect reduced-motion preference: stop spinning loaders and disable
   non-essential transitions so content stays fully legible. */
@media (prefers-reduced-motion: reduce) {
    .fleet-map-loading i {
        animation: none;
    }
    .fleet-card-map-region,
    .fleet-map-fade,
    .device-charts-host {
        transition: none;
    }
}
