/* magnetic_storms — специфика страницы (graph-* в weather-graph.css) */

/* ── graph_pnav (дневной вид) ── */

.xras-weather-content .graph_pnav {
    max-width: var(--weather-graph-max-w, 850px);
    margin: 15px 0 5px;
    overflow: hidden;
}

.xras-weather-content .graph_pnav::after {
    content: '';
    display: block;
    clear: both;
}

.xras-weather-content .graph_pnav__item {
    color: var(--color-yellow);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.xras-weather-content .graph_pnav__item:hover {
    color: #fff;
    text-decoration: underline;
}

.xras-weather-content .graph_pnav__item-prev {
    float: left;
    padding-left: 20px;
    background: url('/img/icons/larr.gif') 0 50% no-repeat;
}

.xras-weather-content .graph_pnav__item-next {
    float: right;
    padding-right: 20px;
    background: url('/img/icons/rarr.gif') 100% 50% no-repeat;
    text-align: right;
}

.xras-weather-content .graph-area .graph_downloads {
    max-width: 868px;
}

@media (max-width: 991.98px) {
    .xras-weather-content .graph_pnav__item {
        color: var(--color-text);
        font-size: 12px;
    }

    .xras-weather-content .graph_pnav__item:hover {
        color: #fff;
    }
}

@media (max-width: 480px) {
    .xras-weather-content .graph_pnav__item[data-mbltext] .graph_pnav__label-long {
        display: none;
    }

    .xras-weather-content .graph_pnav__item[data-mbltext]::before {
        content: attr(data-mbltext);
        text-transform: lowercase;
    }
}

/* ── Месячный вид: summary_info ── */

.xras-weather-content .summary_info {
    margin-top: 30px;
    font-size: 14px;
}

.xras-weather-content .summary_info__part + .summary_info__part {
    margin-top: 50px;
}

.xras-weather-content .summary_info__data {
    margin-top: 10px;
}

.xras-weather-content .summary_info__label {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--weather-text-md, #c7c7c9);
}

.xras-weather-content .summary_info__label + .summary_info__row,
.xras-weather-content .summary_info__label + .summary_info__storm-list {
    margin-top: 10px;
}

/* Компактный список бурь: короткий формат + 2 колонки (откат: убрать .summary_info--compact-list) */
.xras-weather-content .summary_info--compact-list .summary_info__storm-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 6px;
    max-width: 32rem;
}

.xras-weather-content .summary_info--compact-list .summary_info__storm-list .summary_info__row {
    margin: 0;
}

@media (max-width: 575px) {
    .xras-weather-content .summary_info--compact-list .summary_info__storm-list {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

.xras-weather-content .summary_info__label:not(:first-child) {
    margin-top: 1.25em;
}

.xras-weather-content .summary_info__label b,
.xras-weather-content .summary_info__row b {
    color: #fff;
    font-weight: 600;
}

.xras-weather-content .summary_info__row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 10px 0;
    color: var(--weather-text-md, #c7c7c9);
}

.xras-weather-content .summary_info__row::before {
    content: '';
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
}

.xras-weather-content .buri_row::before {
    background-color: var(--weather-storm-s, red);
}

.xras-weather-content .disturbances_row::before {
    background-color: var(--weather-storm-d, #ffc000);
}

.xras-weather-content .activity_row::before {
    background-color: #f1f1f1;
}

.xras-weather-content .summary_info__row a {
    color: var(--color-yellow);
    text-decoration: none;
}

.xras-weather-content .summary_info__row a:hover {
    color: #fff;
    text-decoration: underline;
}

.xras-weather-content .activity_value {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .xras-weather-content .summary_info__part + .summary_info__part {
        margin-top: 30px;
    }
}

.xras-weather-content .summary_info__data .ms-indices-table {
    margin-top: 0;
}

/* ── Месячный вид: календарь бурь (сетка — weather-graph.css .xras-month-cal) ── */

.xras-weather-content .ms-storm-cal__summary-sep {
    margin: 0 0.5em;
    color: rgba(255, 255, 255, 0.35);
}

.xras-weather-content .ms-storm-cal .xras-month-cal__day {
    color: rgba(255, 255, 255, 0.34);
}

.xras-weather-content .ms-storm-cal__level {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.xras-weather-content .ms-storm-cal__cell--quiet .xras-month-cal__cell-face {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.17);
}

.xras-weather-content .ms-storm-cal__cell--nodata .xras-month-cal__cell-face {
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.xras-weather-content .ms-storm-cal__cell--disturbance .xras-month-cal__cell-face {
    background: rgba(255, 192, 0, 0.5);
    color: #fff;
}

.xras-weather-content .ms-storm-cal__cell--storm .xras-month-cal__cell-face {
    background: rgba(255, 0, 0, 0.5);
    color: #fff;
}

.xras-weather-content .ms-storm-cal__cell--storm.ms-storm-cal__cell--g4 .xras-month-cal__cell-face,
.xras-weather-content .ms-storm-cal__cell--storm.ms-storm-cal__cell--g5 .xras-month-cal__cell-face {
    background: rgba(156, 0, 156, 0.5);
    color: #fff;
}

.xras-weather-content .ms-storm-cal__cell--storm .xras-month-cal__cell-face:hover,
.xras-weather-content .ms-storm-cal__cell--disturbance .xras-month-cal__cell-face:hover {
    filter: brightness(1.15);
    color: #fff;
}

.xras-weather-content .ms-storm-cal__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.xras-weather-content .ms-storm-cal__legend-swatch {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

.xras-weather-content .ms-storm-cal__legend-item--storm-g13 .ms-storm-cal__legend-swatch {
    background: rgba(255, 0, 0, 0.5);
    border: 1px solid rgba(255, 0, 0, 0.65);
}

.xras-weather-content .ms-storm-cal__legend-item--storm-g45 .ms-storm-cal__legend-swatch {
    background: rgba(156, 0, 156, 0.5);
    border: 1px solid rgba(156, 0, 156, 0.65);
}

.xras-weather-content .ms-storm-cal__legend-item--disturbance .ms-storm-cal__legend-swatch {
    background: rgba(255, 192, 0, 0.5);
    border: 1px solid rgba(255, 192, 0, 0.65);
}

.xras-weather-content .ms-storm-cal__legend-item--quiet .ms-storm-cal__legend-swatch {
    border: 1px solid rgba(255, 255, 255, 0.17);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 575px) {
    .xras-weather-content .ms-storm-cal__level {
        font-size: 14px;
    }
}

/* ── Месячный вид: календарь F10.7 / Ap ── */

.xras-weather-content .ms-indices-cal {
    --ms-indices-cell-bg: #bdbdb5;
    --ms-indices-cell-border: rgba(26, 26, 46, 0.2);
}

.xras-weather-content .ms-indices-cal__cell--data .xras-month-cal__cell-face {
    background: var(--ms-indices-cell-bg);
    border: 1px solid var(--ms-indices-cell-border);
    color: #1a1a2e;
}

.xras-weather-content .ms-indices-cal__cell--data a.xras-month-cal__cell-face:hover {
    filter: brightness(0.97);
    color: #1a1a2e;
}

.xras-weather-content .ms-indices-cal__cell--nodata .xras-month-cal__cell-face {
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.xras-weather-content .ms-indices-cal__cell--data .xras-month-cal__day {
    color: rgba(26, 26, 46, 0.45);
}

.xras-weather-content .ms-indices-cal__cell--nodata .xras-month-cal__day {
    color: rgba(255, 255, 255, 0.34);
}

.xras-weather-content .ms-indices-cal__values {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding-top: 10px;
    pointer-events: none;
}

.xras-weather-content .ms-indices-cal__val {
    font-size: 15px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.xras-weather-content .ms-indices-cal__val--ap {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.82;
}

.xras-weather-content .ms-indices-cal__legend-item {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
}

.xras-weather-content .ms-indices-cal__legend-swatch {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    border-radius: 2px;
    background: var(--ms-indices-cell-bg);
    border: 1px solid var(--ms-indices-cell-border);
}

.xras-weather-content .ms-indices-cal__legend-item b {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 575px) {
    .xras-weather-content .ms-indices-cal__val {
        font-size: 13px;
    }

    .xras-weather-content .ms-indices-cal__val--ap {
        font-size: 11px;
    }
}

/* ── Дневной вид: таблица индексов Ap / F10.7 ── */

.xras-weather-content .ms-indices-table {
    width: auto;
    max-width: 100%;
    min-width: min(100%, 520px);
    margin-top: 12px;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.4;
}

.xras-weather-content .ms-indices-table th,
.xras-weather-content .ms-indices-table td {
    padding: 12px 16px;
    border: 1px solid var(--weather-graph-border, rgba(153, 153, 153, 0.49));
    vertical-align: middle;
}

.xras-weather-content .ms-indices-table th {
    color: var(--weather-text-md, #c7c7c9);
    font-weight: 400;
    text-align: left;
}

.xras-weather-content .ms-indices-table td {
    color: #fff;
    font-size: 17px;
    text-align: center;
    white-space: nowrap;
}

.xras-weather-content .ms-indices-table th b {
    color: #fff;
    font-weight: 600;
}

.xras-weather-content .ms-indices-table td b {
    font-weight: 600;
}

@media (min-width: 992px) {
    .xras-weather-content .ms-indices-table {
        max-width: 640px;
    }

    .xras-weather-content .ms-indices-table th {
        width: auto;
        min-width: 360px;
        max-width: 480px;
    }

    .xras-weather-content .ms-indices-table td {
        width: 7.5rem;
        min-width: 7.5rem;
    }
}

@media (max-width: 991.98px) {
    .xras-weather-content .ms-indices-table {
        width: 100%;
        min-width: 0;
        font-size: 14px;
    }

    .xras-weather-content .ms-indices-table th,
    .xras-weather-content .ms-indices-table td {
        padding: 10px 12px;
    }

    .xras-weather-content .ms-indices-table th {
        width: 65%;
    }

    .xras-weather-content .ms-indices-table td {
        font-size: 16px;
    }
}

/* ── компактный вид (день, тип A) ── */

.xras-weather-content .magnetic-storms-compact-header .graph_lastdata {
    display: none;
}

.xras-weather-content [data-weather-compact-view].is-compact .magnetic-storms-compact-header .graph_lastdata {
    display: flex;
    margin-top: 1.2em;
    margin-bottom: 0;
}

.xras-weather-content [data-weather-compact-view].is-compact .graph-area--ms-indices .ms-indices-table {
    margin-top: 0;
}

/* ── компактный вид (месяц, тип B) ── */

.xras-weather-content .magnetic-storms-month-content.is-compact .graph_downloads,
.xras-weather-content .magnetic-storms-month-content.is-compact .summary_info {
    display: none;
}

.xras-weather-content .magnetic-storms-month-content.is-compact .xras-month-cal__header {
    display: none;
}

.xras-weather-content .magnetic-storms-month-content.is-compact .xras-month-cal {
    margin-top: 1.4em;
}

.xras-weather-content .magnetic-storms-month-content.is-compact .graph-area .graph_subtitle {
    display: none;
}

.xras-weather-content .magnetic-storms-month-content.is-compact .graph-area .graph_title {
    display: none;
}
