/*
Theme Name: Xchange Pub Theme
Theme URI: https://xchange.ink/
Description: Дочерняя тема в стиле xchange.pub. Наследуется от Premium Exchanger Theme (exchanger). Меняет только внешний вид — все настройки плагина Premium Exchanger (направления, курсы, резервы, AML, кабинет) работают как раньше.
Author: Xchange.ink
Version: 1.1
Template: exchanger
Text Domain: pntheme
*/

/* ============================================================
   Layout-overrides поверх родительской темы.
   Этот файл загружается ПОСЛЕДНИМ (см. functions.php),
   поэтому здесь живут самые приоритетные правила.
   ============================================================ */

/* Хедер — чтобы лого, меню, аккаунт+язык лежали в одном ряду */
body .site-header > .container,
body .site-header .container {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 18px;
}

body .site-header__logo {
    flex: 0 0 auto;
}

body .site-header__nav {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
}

body .site-header__nav ul {
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body .site-header__nav ul li { list-style: none; }
body .site-header__nav ul li a { color: #fff; text-decoration: none; font-weight: 600; }
body .site-header__nav ul li a.active,
body .site-header__nav ul li a:hover { color: #fd6510; }

/* Аккаунт + язык — прижать к правому краю */
body .site-header__auth {
    flex: 0 0 auto;
    width: auto !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px;
}

/* Контейнер языкового переключателя из плагина (.tolbar_lang) */
body .site-header__auth .tolbar_lang,
body .site-header__auth .topbar_lang,
body .site-header__auth .language {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

body .site-header__auth .tolbar_lang img,
body .site-header__auth .language img {
    width: 24px;
    height: auto;
    border-radius: 4px;
}

/* Кнопки в хедере — не растягиваться */
body .site-header__auth .btn { flex: 0 0 auto; white-space: nowrap; }

/* Главная: убрать пустые отступы у контента, который рендерит [exchange] */
.home-content-wrap { padding: 0; margin: 0; }
.home-content-wrap .text { background: transparent; padding: 0; }

/* ============================================================
   Dark theme для внутренних страниц (не главной).
   Распространяет стиль главной на news/reviews/contacts/page-default.
   ============================================================ */

/* Высокая специфичность (html body.X) — перебивает inline custom-background от WP */
html body,
html body.custom-background,
html body:not(.home),
html body.custom-background:not(.home) {
    background-color: #0e0f12 !important;
    background-image: none !important;
    background: #0e0f12 !important;
}

html body:not(.home) {
    color: #d8dadf !important;
}

/* На случай если узор лежит на #container или wrapper-диве */
html body #container,
html body > .wrap,
html body > .site-wrap {
    background: transparent !important;
    background-image: none !important;
}

body:not(.home) main,
body:not(.home) #container,
body:not(.home) .page_wrap,
body:not(.home) .many_news_wrap,
body:not(.home) .single_news_wrap,
body:not(.home) .many_reviews,
body:not(.home) .term_description,
body:not(.home) .text {
    background-color: transparent !important;
    color: #d8dadf;
}

/* Оборачивающий контейнер контента — добавляем воздух */
body:not(.home) main {
    padding: 40px 0 60px;
}

body:not(.home) main > .page_wrap,
body:not(.home) main > .many_news_wrap,
body:not(.home) main > .single_news_wrap,
body:not(.home) main > .many_reviews {
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

/* Заголовки */
body:not(.home) h1,
body:not(.home) h2,
body:not(.home) h3,
body:not(.home) h4,
body:not(.home) h5,
body:not(.home) h6 {
    color: #ffffff !important;
}

/* Параграфы / общий текст */
body:not(.home) p,
body:not(.home) li,
body:not(.home) dd,
body:not(.home) dt {
    color: #d8dadf;
}

/* Ссылки */
body:not(.home) a { color: #fd6510; }
body:not(.home) a:hover { color: #ff8a3a; }

/* ---------- Новости (архив /news/) ---------- */
body:not(.home) .one_news {
    background: #1a1d22;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 18px;
}

body:not(.home) .one_news_title a,
body:not(.home) .one_news_title a span {
    color: #ffffff !important;
    text-decoration: none;
}

body:not(.home) .one_news_title a:hover,
body:not(.home) .one_news_title a:hover span {
    color: #fd6510 !important;
}

body:not(.home) .one_news_date {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    color: #b0b3b8;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin: 6px 0 12px;
}

body:not(.home) .one_news_excerpt .text,
body:not(.home) .one_news_excerpt a {
    color: #d8dadf !important;
    text-decoration: none;
}

body:not(.home) .one_news_more {
    display: inline-block;
    background: #fd6510;
    color: #ffffff !important;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s;
}
body:not(.home) .one_news_more:hover {
    background: #ff7a1a;
    color: #ffffff !important;
}

body:not(.home) .metabox_div {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

body:not(.home) .metabox_cats,
body:not(.home) .metabox_tags { color: #8a8d92; font-size: 13px; }
body:not(.home) .metabox_cats a,
body:not(.home) .metabox_tags a { color: #fd6510; }

/* Single post */
body:not(.home) .single_news {
    background: #1a1d22;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 32px 36px;
}

/* ---------- Отзывы ---------- */
body:not(.home) .many_reviews_ins { display: flex; flex-direction: column; gap: 14px; }

body:not(.home) .one_reviews {
    background: #1a1d22;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px 24px;
    background-image: none !important;
}
body:not(.home) .one_reviews_ins { background: transparent !important; }
body:not(.home) .one_reviews_abs { display: none; }

body:not(.home) .one_reviews_name {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
}

body:not(.home) .one_reviews_date {
    color: #8a8d92;
    font-size: 13px;
    margin: 4px 0 10px;
}

body:not(.home) .one_reviews_text { color: #d8dadf; line-height: 1.5; }

body:not(.home) .one_reviews_answer {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(253,101,16,0.08);
    border-left: 3px solid #fd6510;
    border-radius: 6px;
}
body:not(.home) .one_reviews_answer_title { color: #fd6510; font-weight: 600; margin-bottom: 4px; }

body:not(.home) .no_reviews { color: #8a8d92; padding: 40px; text-align: center; }

/* ---------- Форма "Опубликовать отзыв" (.rf_*) ---------- */
body:not(.home) .rf_div_wrap {
    background: #1a1d22 !important;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-top: 24px;
    overflow: hidden;
}

body:not(.home) .rf_div_title {
    background: transparent !important;
    padding: 20px 28px 0;
}
body:not(.home) .rf_div_title_ins {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 18px;
    text-transform: none;
}

body:not(.home) .rf_div { background: transparent !important; padding: 0; }
body:not(.home) .rf_div_ins {
    background: transparent !important;
    padding: 20px 28px 28px;
}

body:not(.home) .rf_line {
    background: transparent !important;
    margin-bottom: 16px;
}
body:not(.home) .rf_line_title,
body:not(.home) .rf_line label,
body:not(.home) .rf_line .title {
    color: #d8dadf !important;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}
body:not(.home) .rf_line .req,
body:not(.home) .rf_line_title .req { color: #fd6510 !important; }

body:not(.home) .rf_line input[type="text"],
body:not(.home) .rf_line input[type="email"],
body:not(.home) .rf_line textarea {
    width: 100%;
    box-sizing: border-box;
    background: #0e0f12 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

body:not(.home) .rf_line.has_submit { margin-top: 8px; margin-bottom: 0; }

/* ============================================================
   Generic dark-стиль для ВСЕХ форм/виджетов плагина premiumbox
   на внутренних страницах. Селекторы плагина следуют схеме:
   [name]_div_wrap > [name]_div_title > [name]_div_title_ins
                  > [name]_div > [name]_div_ins > [name]_line
   Покрывает: login, register, lost password, contacts,
   check-status, user-verify, account, widgets reserves/CBR.
   home_* блоки исключены через body:not(.home).
   ============================================================ */

body:not(.home) [class$="_div_wrap"],
body:not(.home) [class*="_div_wrap "] {
    background: #1a1d22 !important;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    margin-top: 16px;
    overflow: hidden;
}

body:not(.home) [class$="_div_title"],
body:not(.home) [class*="_div_title "] {
    background: transparent !important;
    padding: 18px 24px 0;
}

body:not(.home) [class$="_div_title_ins"] {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 17px;
    text-transform: none;
}

body:not(.home) [class$="_div"]:not([class$="_div_wrap"]):not([class$="_div_title"]):not([class$="_div_ins"]) {
    background: transparent !important;
}

body:not(.home) [class$="_div_ins"] {
    background: transparent !important;
    padding: 18px 24px 22px;
}

body:not(.home) [class$="_line"] {
    background: transparent !important;
    margin-bottom: 14px;
}

body:not(.home) [class$="_line_title"] {
    color: #d8dadf !important;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

body:not(.home) .req {
    color: #fd6510 !important;
}

/* Поля внутри любых форм плагина */
body:not(.home) [class$="_line"] input[type="text"],
body:not(.home) [class$="_line"] input[type="email"],
body:not(.home) [class$="_line"] input[type="password"],
body:not(.home) [class$="_line"] input[type="tel"],
body:not(.home) [class$="_line"] input[type="number"],
body:not(.home) [class$="_line"] textarea,
body:not(.home) [class$="_line"] select {
    width: 100%;
    box-sizing: border-box;
    background: #0e0f12 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

/* ============================================================
   Модальные окна (логин, регистрация, инфо) — GLOBAL (без :not(.home))
   потому что они появляются динамически на любой странице.
   ============================================================ */

/* Внешний .standart_window — только позиционирование, без визуальной карточки */
.standart_window {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #d8dadf !important;
}

/* Видимая карточка — на внутреннем .standart_windowins */
.standart_windowins,
.info_window,
.head_bids_window {
    background: #1a1d22 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 12px !important;
    color: #d8dadf !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6) !important;
}

.standart_window_title,
.standart_window_content,
.standart_window_content_ins,
.standart_window_scrollcontent,
.standart_window_submit {
    background: transparent !important;
    border: none !important;
    color: #d8dadf !important;
}

.standart_window_title_ins,
.standart_window h1, .standart_window h2, .standart_window h3,
.info_window h1, .info_window h2, .info_window h3 {
    color: #ffffff !important;
    font-weight: 600;
}

.standart_shadow {
    background: rgba(0,0,0,0.7) !important;
}

/* Кнопка закрытия модалки */
.info_window_abs, .notice_message_abs,
.standart_window_close, .info_window_close {
    filter: invert(1) brightness(2);
    opacity: 0.7;
}
.info_window_abs:hover, .standart_window_close:hover { opacity: 1; }

/* Внутри модалки — формы плагина тоже должны быть тёмными */
.standart_window [class$="_div_wrap"],
.standart_window [class*="_div_wrap "],
.info_window [class$="_div_wrap"],
.info_window [class*="_div_wrap "] {
    background: transparent !important;
    border: none !important;
    margin-top: 0 !important;
}
.standart_window [class$="_div_title_ins"],
.info_window [class$="_div_title_ins"] { color: #ffffff !important; }
.standart_window [class$="_line_title"],
.info_window [class$="_line_title"] { color: #d8dadf !important; }
.standart_window input, .standart_window textarea, .standart_window select,
.info_window input, .info_window textarea, .info_window select {
    background: #0e0f12 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

/* ============================================================
   Уведомления (flash-сообщения после submit)
   ============================================================ */

.notice_message {
    background: #1a1d22 !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    color: #d8dadf !important;
}
.notice_message_title_ins { color: #ffffff !important; font-weight: 600; }
.notice_message_text_ins { color: #d8dadf !important; }

/* ============================================================
   Капча и ошибки форм (внутри dark-страниц)
   ============================================================ */

body:not(.home) .captcha_body,
body:not(.home) .captcha_sci_body,
body:not(.home) .captcha_div,
body:not(.home) .captcha_sci_div {
    background: transparent !important;
    color: #d8dadf !important;
}
body:not(.home) .captcha_title,
body:not(.home) .captcha_sci_title { color: #d8dadf !important; }

body:not(.home) .captcha_divpole,
body:not(.home) .captcha_sci_div_change {
    background: #0e0f12 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
}

/* Ошибки валидации — НЕ трогаем контейнеры (плагин сам управляет видимостью).
   Только меняем цвет текста ошибки на читаемый красный когда он реально появится. */
body:not(.home) .exch_error,
body:not(.home) .exch_error_ins,
body:not(.home) .error_div,
body:not(.home) .form_field_errors,
body:not(.home) .form_field_errors_ins {
    color: #ff6b7a;
}

/* ---------- Page-default (Контакты, Карта сайта, etc.) ---------- */
body:not(.home).page .page_wrap > .text {
    background: #1a1d22;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 32px 36px;
}

/* Формы (Контакты, обратная связь — частые поля) */
body:not(.home) input[type="text"],
body:not(.home) input[type="email"],
body:not(.home) input[type="password"],
body:not(.home) input[type="tel"],
body:not(.home) input[type="number"],
body:not(.home) textarea,
body:not(.home) select {
    background: #0e0f12;
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 14px;
}
body:not(.home) input:focus,
body:not(.home) textarea:focus,
body:not(.home) select:focus {
    border-color: #fd6510;
    outline: none;
}

body:not(.home) button,
body:not(.home) input[type="submit"],
body:not(.home) .btn {
    background: #fd6510 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-align: center !important;
    text-indent: 0 !important;
    line-height: 1.2 !important;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
body:not(.home) button:hover,
body:not(.home) input[type="submit"]:hover,
body:not(.home) .btn:hover { background: #ff7a1a; color: #ffffff; }

/* Pagination */
body:not(.home) .wp-pagenavi {
    margin-top: 24px;
    text-align: center;
}
body:not(.home) .wp-pagenavi a,
body:not(.home) .wp-pagenavi span {
    background: #1a1d22;
    color: #d8dadf;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 8px 14px;
    border-radius: 6px;
    margin: 0 3px;
    text-decoration: none;
}
body:not(.home) .wp-pagenavi span.current,
body:not(.home) .wp-pagenavi a:hover {
    background: #fd6510;
    color: #fff;
    border-color: #fd6510;
}

/* ---------- Footer: фикс невидимого текста телефона/расписания ---------- */
.site-footer .footer_phone,
.site-footer .footer_phone a {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
}
.site-footer .footer_timetable,
.site-footer .footer_timetable * {
    color: #b0b3b8 !important;
    font-size: 13px;
    line-height: 1.45;
}
