/* Mobile station overview styles */

.mobile-overview-mobile {
    /* margin: 1.5rem 0; */
    padding: 5px;
    /* border: 1px solid rgba(148, 163, 184, 0.35); */
    /* border-radius: 0.85rem; */
    background: rgba(248, 250, 252, 0.92);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.mobile-overview-toggle-icon-mobile {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.95);
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.mobile-overview-toggle-icon-mobile::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.mobile-overview-collapsed-toggle.is-collapsed .mobile-overview-toggle-icon-mobile::before {
    transform: rotate(-135deg);
}

.mobile-overview-collapsed-toggle:hover .mobile-overview-toggle-icon-mobile,
.mobile-overview-collapsed-toggle:focus-visible .mobile-overview-toggle-icon-mobile {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(37, 99, 235, 0.55);
    color: #1d4ed8;
}
.mobile-overview-content-mobile {
    padding-top: 1rem;
}

.mobile-overview-row-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.mobile-overview-row-mobile:last-of-type {
    margin-bottom: 0;
}

.mobile-overview-row-heading-mobile {
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #1e293b;
    text-transform: uppercase;
}

.mobile-overview-list-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: stretch;
}

.mobile-overview-collapsed-row-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.mobile-overview-collapsed-list-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0.5rem;
}

.mobile-overview-chip-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    /* border-radius: 0.85rem; */
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 100%;
    min-width: 120px;
    flex: 1 1 125px;
    max-width: 125px;
    width: 100%;
    align-items: center;
    text-align: center;
}

.mobile-overview-chip-mobile:hover {
    transform: translateY(-2px);
    /* box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18); */
}

.mobile-overview-chip--geosphere-mobile {
    background: linear-gradient(135deg, rgba(226, 232, 240, 0.4), #f8fafc);
}

.mobile-overview-chip--stale-mobile {
    opacity: 0.85;
}

.mobile-overview-chip-header-mobile {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.25rem;
    justify-content: center;
    width: 100%;
}

.mobile-overview-chip-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.mobile-overview-chip-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    align-self: stretch;
}

.mobile-overview-chip-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-overview-chip-title-row .mobile-overview-chip-name-mobile {
    flex: 1 1 auto;
}

.mobile-overview-chip-collapse {
    margin-left: auto;
}

.mobile-overview-chip-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.95);
    color: #1e293b;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mobile-overview-chip-map-link:hover,
.mobile-overview-chip-map-link:focus-visible {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(37, 99, 235, 0.55);
    color: #1d4ed8;
    outline: none;
}

.mobile-overview-chip-map-icon {
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.mobile-overview-chip-name-mobile {
    font-size: clamp(0.5rem, 4vw, 0.62rem);
    font-weight: 700;
    color: #0f172a;
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    line-height: 1.05;
    word-break: keep-all;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-overview-chip-name-mobile--medium {
    font-size: clamp(0.6rem, 2.25vw, 0.66rem);
}

.mobile-overview-chip-name-mobile--small {
    font-size: clamp(0.56rem, 2vw, 0.62rem);
}

.mobile-overview-chip-source-mobile {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.mobile-overview-chip-collapse {
    position: static;
    min-width: 1.9rem;
    height: 1.85rem;
    padding: 0 0.55rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(248, 250, 252, 0.95);
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    margin-left: auto;
}

.mobile-overview-chip-collapse:hover,
.mobile-overview-chip-collapse:focus-visible {
    background: rgba(226, 232, 240, 0.9);
    border-color: rgba(37, 99, 235, 0.55);
    color: #1d4ed8;
    outline: none;
}

.mobile-overview-chip-collapse-icon {
    font-size: 0.9rem;
    line-height: 1;
    pointer-events: none;
}

.mobile-overview-heading-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1f2937;
    margin-bottom: 0.35rem;
}

.mobile-overview-heading-label-mobile {
    font-size: 0.82rem;
}

.mobile-overview-collapsed-heading-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.mobile-overview-collapsed-heading-bar.is-collapsed {
    opacity: 0.85;
}

.mobile-overview-collapsed-toggle {
    border: none;
    background: none;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-overview-collapsed-toggle:hover,
.mobile-overview-collapsed-toggle:focus-visible {
    background: rgba(226, 232, 240, 0.9);
    color: #1d4ed8;
    outline: none;
}

.mobile-overview-collapsed-toggle-icon {
    font-size: 1rem;
    line-height: 1;
}

.mobile-overview-chip-metrics-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: #1e293b;
}

.mobile-overview-chip-trends {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
    color: #475569;
    font-size: 0.68rem;
}

.mobile-overview-chip-trend-line {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    width: 100%;
}

.mobile-overview-chip-trend-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.6rem;
    color: #1f2937;
}

.mobile-overview-chip-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    flex-wrap: wrap;
    line-height: 1.2;
    width: 100%;
    justify-content: flex-start;
}

.mobile-overview-chip-trend-icon {
    font-size: 0.85rem;
    line-height: 1;
    flex: 0 0 auto;
}

.mobile-overview-chip-trend-text {
    font-size: 0.7rem;
    white-space: normal;
    flex: 1 1 auto;
    min-width: 0;
}

.mobile-overview-chip-sparkline-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.45rem;
}

.mobile-overview-chip-sparkline-axis {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.58rem;
    color: #475569;
    margin-bottom: 0.15rem;
    padding: 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mobile-overview-chip-sparkline-axis-min,
.mobile-overview-chip-sparkline-axis-max {
    flex: 0 0 auto;
    min-width: 2.5rem;
}

.mobile-overview-chip-sparkline-axis-min {
    text-align: left;
}

.mobile-overview-chip-sparkline-axis-max {
    text-align: right;
}

.mobile-overview-chip-sparkline {
    display: block;
    width: 125px;
    height: 90px;
    margin: 0;
}

.mobile-overview-chip-metric-mobile {
    display: flex;
    justify-content: space-between;
    gap: 0.35rem;
    font-weight: 600;
}

.mobile-overview-chip-metric-direction-mobile {
    text-transform: uppercase;
}

.mobile-overview-chip-metric-mobile span {
    white-space: nowrap;
}

.mobile-overview-content-mobile[hidden] {
    display: none !important;
}

/* Station mini mobile adjustments */

.station-mini-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    align-items: center;
}

.station-mini-mobile .station-windrose {
    margin: 0 auto;
    width: clamp(4.4rem, 32vw, 5.4rem);
    height: clamp(4.4rem, 32vw, 5.4rem);
    min-width: 4.4rem;
    min-height: 4.4rem;
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
}

.station-windrose-mobile {
    --ring-size: 6px;
    --scale-inset: calc(var(--ring-size) - 2px);
    --scale-major-width: 1.2deg;
    --scale-major-length: 11px;
    --scale-minor-width: 0.5deg;
    --scale-minor-length: 6px;
    --scale-color: rgba(71, 85, 105, 0.35);
    --label-radius-primary: 51px;
    --label-radius-primary-short: 51px;
    --label-radius-minor: 30px;
    --arrow-border-width: 1.2;
}

.station-windrose-mobile .station-windrose-label {
    font-size: 0.56rem;
    letter-spacing: 0.025em;
    color: var(--label-color, rgba(71, 85, 105, 0.92));
    text-shadow: none;
}

.station-windrose-mobile .station-windrose-label--primary {
    font-size: 0.64rem;
}

.station-windrose-mobile .station-windrose-label--minor {
    font-size: 0.48rem;
}

.station-windrose-mobile .station-windrose-scale {
    opacity: 0.65;
}

.station-windrose-mobile .station-windrose-arrow {
    width: 16px;
    height: 100%;
    top: 0;
    transform-origin: 50% 50%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.station-windrose-mobile .station-windrose-arrow-svg {
    width: 100%;
    height: calc(45% + var(--ring-size));
    bottom: calc(-1 * var(--ring-size) + 26px);
    transform: translateX(-50%) rotate(180deg) scaleY(0.46);
    transform-origin: 50% 100%;
    filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.22));
}

.station-windrose-mobile .station-windrose-peak-arrow {
    width: 14px;
    height: 100%;
    top: 0;
    transform-origin: 50% 50%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    color: #ef4444;
    opacity: 0.9;
}

.station-windrose-mobile .station-windrose-peak-arrow-svg {
    width: 100%;
    height: calc(45% + var(--ring-size));
    bottom: calc(-1 * var(--ring-size) + 24px);
    transform: translateX(-50%) rotate(180deg) scaleY(0.44);
    transform-origin: 50% 100%;
    filter: drop-shadow(0 4px 9px rgba(239, 68, 68, 0.28));
}

.station-windrose-peak-arrow-svg-mobile polygon {
    stroke-width: 1.4;
}

.station-mini-info-mobile {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(4.4rem, 32vw, 5.4rem);
    transform: translate(-50%, -50%);
    gap: 0.15rem;
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    pointer-events: none;
    z-index: 7;
}

.station-mini-direction-cardinal-mobile {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--station-heading-color, var(--station-heading-color-default, #475569));
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.25);
    line-height: 1.05;
}

.station-mini-heading-mobile {
    display: block;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--station-heading-color, var(--station-heading-color-default, #4b5563));
    text-shadow: 0 1px 1px rgba(15, 23, 42, 0.2);
    text-transform: uppercase;
    line-height: 1.05;
}

.station-windrose--north .station-mini-direction-cardinal-mobile,
.station-windrose--north .station-mini-heading-mobile,
.station-windrose--north .station-mini-info-mobile,
.station-windrose--geosphere .station-mini-direction-cardinal-mobile,
.station-windrose--geosphere .station-mini-heading-mobile,
.station-windrose--geosphere .station-mini-info-mobile {
    color: #475569 !important;
    text-shadow: none;
    --station-heading-color: #475569;
}

.station-mini-speeds-block-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: center;
    margin-top: 0.25rem;
}

.station-mini-speeds-block-mobile .station-mini-speeds {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0;
    width: auto;
}

.station-mini-speeds-block-mobile .station-mini-speed {
    min-width: 37px;
    padding: 0.18rem 0.32rem;
    font-size: 0.82rem;
}

.station-mini-speeds-block-mobile .station-mini-speed__label {
    font-size: 0.62rem;
    letter-spacing: 0.05em;
}

.station-mini-speeds-block-mobile .station-mini-speed__value {
    font-size: 0.86rem;
}

.station-mini-unit-mobile-label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
    text-align: center;
}

.mobile-overview-chip-meta-mobile {
    margin-top: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.62rem;
    line-height: 1.15;
    color: #64748b;
    text-align: center;
}

.mobile-overview-chip-meta-label-mobile {
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.mobile-overview-chip-meta-value-mobile {
    font-weight: 600;
    color: #334155;
}

.mobile-overview-chip-meta-mobile--warning .mobile-overview-chip-meta-value-mobile {
    color: #dc2626;
}

.station-mini-flags-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.35rem;
}

.station-mini-warning-mobile,
.station-mini-hint-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.12rem 0.6rem;
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0;
}

.station-mini-warning-mobile {
    background: #fee2e2;
    border: 1.5px solid #dc2626;
    color: #b91c1c;
    font-weight: 700;
}

.station-mini-hint-mobile {
    background: #dcfce7;
    border: 1.5px solid #22c55e;
    color: #166534;
    font-weight: 600;
}

.station-windrose--has-warning .station-mini-info-mobile {
    top: 50%;
    transform: translate(-50%, -58%);
}

.station-windrose--has-hint .station-mini-info-mobile {
    top: 50%;
    transform: translate(-50%, -58%);
}

.station-windrose--has-warning.station-windrose--has-hint .station-mini-info-mobile {
    top: 50%;
    transform: translate(-50%, -62%);
}

.station-windrose--north .station-mini-direction-cardinal-mobile,
.station-windrose--south .station-mini-direction-cardinal-mobile {
    color: inherit;
}


.mobile-overview-chip-mobile--collapsed {
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    flex: 0 0 135px;
    max-width: 135px;
    width: 135px;
    min-height: 0;
    height: auto;
    justify-content: center;
    gap: 0.35rem;
}

.mobile-overview-chip-mobile--collapsed .station-mini,
.mobile-overview-chip-mobile--collapsed .station-mini-unit-mobile-label,
.mobile-overview-chip-mobile--collapsed .station-mini-speeds-block-mobile,
.mobile-overview-chip-mobile--collapsed .station-mini-flags-mobile,
.mobile-overview-chip-mobile--collapsed .mobile-overview-chip-meta-mobile {
    display: none !important;
}

.mobile-overview-chip-mobile--collapsed .mobile-overview-chip-header-mobile {
    padding-right: 0;
    margin-bottom: 0;
    gap: 0.1rem;
}

.mobile-overview-chip-mobile--collapsed .mobile-overview-chip-source-mobile {
    display: none;
}
