/* =========================================================
   Odessa News Weather
   Header widget
   ========================================================= */


/* Убираем стандартные отступы WordPress-виджета,
   которые могут увеличивать высоту шапки */
.header-widget-area .widget {
    margin: 0 !important;
    padding: 0 !important;
}


/* Контейнер области справа от логотипа */
.site-header .header-widget-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


/* Сам погодный информер */
.header-widget-area .onw-weather {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;

    gap: 8px;

    margin: 0 !important;
    padding: 0 !important;

    min-height: 0;

    line-height: 1;
    font-family: inherit;
    color: #111;
}


/* Иконка */
.onw-weather__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    margin: 0;
    padding: 0;
}

.onw-weather__icon img {
    display: block;

    width: 38px;
    height: 38px;

    margin: 0;
    padding: 0;
}


/* Правая текстовая часть */
.onw-weather__content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    gap: 3px;

    margin: 0;
    padding: 0;
}


/* Температура + Одесса */
.onw-weather__main {
    display: flex;
    align-items: baseline;

    gap: 8px;

    margin: 0;
    padding: 0;

    white-space: nowrap;
    line-height: 1;
}


/* Температура */
.onw-weather__temp {
    margin: 0;
    padding: 0;

    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.4px;
}


/* Город */
.onw-weather__city {
    margin: 0;
    padding: 0;

    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}


/* Состояние погоды */
.onw-weather__condition {
    margin: 0;
    padding: 0;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.2;

    color: #888;

    white-space: nowrap;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 767px) {

    .site-header .header-widget-area {
        justify-content: flex-start;
    }

    .header-widget-area .onw-weather {
        height: 48px;
        gap: 7px;
    }

    .onw-weather__icon img {
        width: 32px;
        height: 32px;
    }

    .onw-weather__temp {
        font-size: 19px;
    }

    .onw-weather__city {
        font-size: 13px;
    }

    .onw-weather__condition {
        font-size: 10px;
    }
}

/* =========================================================
   NewsPlus header integration
   ========================================================= */

/*
 * Логотип и weather являются соседними колонками.
 * Делаем родительскую строку flex и центрируем обе
 * колонки по одной вертикальной оси.
 */
#header.site-header > .wrap.full-width {
    display: flex !important;
    align-items: center !important;
}


/*
 * Левая колонка с логотипом.
 * Float в flex-контейнере больше не нужен.
 */
#header.site-header .brand {
    float: none !important;
}


/*
 * Правая колонка с погодой.
 */
#header.site-header .header-widget-area {
    float: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    align-self: center !important;

    margin-left: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
}


/*
 * WordPress Gutenberg widget wrapper.
 */
#header.site-header .header-widget-area .hwa-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    margin: 0 !important;
    padding: 0 !important;
}


/*
 * Gutenberg добавил пустые <p></p>
 * до и после shortcode. Они нам не нужны.
 */
#header.site-header .header-widget-area .hwa-wrap > p:empty {
    display: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


/*
 * Сам weather больше НЕ задаёт высоту шапки.
 */
#header.site-header .header-widget-area .onw-weather {
    display: inline-flex !important;
    align-items: center !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
}


/*
 * Убираем возможные стандартные отступы widget.
 */
#header.site-header .header-widget-area .widget,
#header.site-header .header-widget-area .widget_block {
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
