/**
 * Global shell layout layer: sections/footer glass, auth modal shell, base typography scale.
 * Extracted from equinox-custom.css.
 */

.section,
.section_content_wrapper,
.homepage-disclaimer .disclaimer,
.hometext-wrapper_ins,
.widget_cbr_div_ins,
.partners-section .section_ins,
.news-section .section_ins,
.reviews .section_ins,
.last-exchanges .section_ins {
    background: var(--eq-surface-section) !important;
    border: 1px solid var(--eq-glass-hairline);
    border-radius: 18px;
    backdrop-filter: blur(8px);
}

/* Remove remaining white blocks on homepage/inner sections */
.container,
.page-block,
.main-wrapper,
.inner-content,
.inner,
.widget,
.widget_ins,
.news,
.news__content,
.feedback,
.icon-card,
.reserve-item,
.partner_item,
.widget_cbr_line,
.section_ins,
.section_content_wrapper,
.homepage_wrap {
    background-color: transparent !important;
}

/* Footer glass */
.footer,
.footer__grid,
.footer__col-1,
.footer__col-2,
.footer__col-3,
.footer__nav,
.footer__contacts,
.footer__info {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* Footer social icons: no stroke */
body.equinox-shell .footer__social {
    border: 0 !important;
    box-shadow: none !important;
}

/* "Service exchange..." text: 30% smaller */
body.equinox-shell .footer .cop {
    font-size: 70% !important;
    line-height: 1.35 !important;
}

.footer {
    border-top: 0 !important;
}

/* Login/Register top buttons */
.user-bar__link,
.header__auth .user-bar__link,
.auth-wrapper .user-bar__link,
.link-login,
.link-register {
    background: var(--eq-glass-fill-strong) !important;
    border: 1px solid var(--eq-glass-stroke-strong) !important;
    color: #fff !important;
    backdrop-filter: blur(8px);
}

.header__auth,
.auth-wrapper,
.user-bar__link,
.link-login,
.link-register {
    position: relative;
    z-index: 2000 !important;
    pointer-events: auto !important;
}

.lang_auth_wrapper,
.contacts_wrapper,
.user-bar__container {
    position: relative;
    z-index: 1500;
}

/* PremiumBox modal windows (login/register) */
.standart_shadow {
    background: rgba(5, 8, 16, 0.7) !important;
    backdrop-filter: blur(3px);
}

.standart_window_ins,
.standart_window.update_window .standart_window_ins,
.loginform_box,
.registerform_box {
    background: rgba(11, 17, 33, 0.88) !important;
    border: 1px solid var(--eq-glass-stroke) !important;
    box-shadow: var(--eq-shadow-modal) !important;
    backdrop-filter: blur(12px);
}

.standart_window_title {
    background: var(--eq-glass-fill-muted) !important;
    color: #fff !important;
    border-bottom: 1px solid var(--eq-glass-stroke-faint) !important;
}

.standart_window_content,
.loginform_box .rb_line,
.registerform_box .rb_line {
    background: transparent !important;
    color: #dbe6ff !important;
}

.loginform_box input,
.registerform_box input,
.loginform_box textarea,
.registerform_box textarea {
    background: var(--eq-glass-fill-soft) !important;
    border: 1px solid var(--eq-glass-stroke-muted) !important;
    color: #fff !important;
}

/* Custom auth modal (fallback independent from Premium JsWindow) */
.equinox-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.equinox-auth-modal.is-open {
    display: block;
}

.equinox-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 16, 0.72);
    backdrop-filter: blur(3px);
}

.equinox-auth-modal__dialog {
    position: relative;
    max-width: 560px;
    width: calc(100% - 24px);
    margin: 6vh auto 0;
    border-radius: 16px;
    background: rgba(11, 17, 33, 0.92);
    border: 1px solid var(--eq-glass-stroke);
    box-shadow: var(--eq-shadow-modal);
    backdrop-filter: blur(12px);
    padding: 1.2rem;
}

.equinox-auth-modal__close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.equinox-auth-modal__content .loginform_box,
.equinox-auth-modal__content .registerform_box,
.equinox-auth-modal__content .standart_window_content,
.equinox-auth-modal__content .rb_line {
    background: transparent !important;
}

/* Unified glass background (same as auth/lang controls) */
#legacy-exchange-fallback .xchange_table_wrap,
.main-form .xchange_table_wrap,
.section .section_ins,
.section .section_content_wrapper,
.homepage-disclaimer .disclaimer,
.hometext-wrapper_ins,
.widget_cbr_div_ins,
.partners-section .section_ins,
.news-section .section_ins,
.reviews .section_ins,
.last-exchanges .section_ins,
.home-reserve .section_ins,
.courses-section .section_ins,
.footer,
.footer__grid,
.footer__col-1,
.footer__col-2,
.footer__col-3,
.footer__nav,
.footer__contacts,
.footer__info {
    background: var(--eq-glass-fill-strong) !important;
    border: 1px solid var(--eq-glass-stroke-strong) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.section .section_ins,
.section .section_content_wrapper,
.footer,
.footer__grid {
    border-radius: 18px !important;
}

/* ===== Final Apple Glass reset (highest priority) ===== */
/* 1) Calculator: only outer container has glass background */
#legacy-exchange-fallback .xchange_table_wrap,
.main-form .xchange_table_wrap {
    background: var(--eq-glass-fill-strong) !important;
    border: 1px solid var(--eq-glass-stroke-strong) !important;
    border-radius: 24px !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    box-shadow: var(--eq-shadow-card-strong) !important;
}

/* 2) Text color globally (homepage template + all Equinox shell pages) */
body.flarex-homepage-template,
body.equinox-shell,
body.flarex-homepage-template p,
body.equinox-shell p,
body.flarex-homepage-template span,
body.equinox-shell span,
body.flarex-homepage-template h1,
body.equinox-shell h1,
body.flarex-homepage-template h2,
body.equinox-shell h2,
body.flarex-homepage-template h3,
body.equinox-shell h3,
body.flarex-homepage-template h4,
body.equinox-shell h4,
body.flarex-homepage-template h5,
body.equinox-shell h5,
body.flarex-homepage-template h6,
body.equinox-shell h6,
body.flarex-homepage-template a,
body.equinox-shell a,
body.flarex-homepage-template .xtp_table_title,
body.equinox-shell .xtp_table_title,
body.flarex-homepage-template .xtp_exchange_rate,
body.equinox-shell .xtp_exchange_rate,
body.flarex-homepage-template .xtp_exchange_reserve,
body.equinox-shell .xtp_exchange_reserve,
body.flarex-homepage-template .xtp_line,
body.equinox-shell .xtp_line,
body.flarex-homepage-template .xtl_line,
body.equinox-shell .xtl_line,
body.flarex-homepage-template .js_amount,
body.equinox-shell .js_amount {
    color: #ffffff !important;
}

/* 3) Lower blocks + footer: lighter transparent glass */
.section .section_ins,
.homepage-disclaimer .disclaimer,
.hometext-wrapper_ins,
.widget_cbr_div_ins,
.partners-section .section_ins,
.news-section .section_ins,
.reviews .section_ins,
.last-exchanges .section_ins,
.home-reserve .section_ins,
.courses-section .section_ins,
.footer,
.footer__grid,
.footer__col-1,
.footer__col-2,
.footer__col-3,
.footer__nav,
.footer__contacts,
.footer__info {
    background: var(--eq-glass-fill-soft) !important;
    border: 1px solid var(--eq-glass-stroke) !important;
    -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
    backdrop-filter: blur(14px) saturate(130%) !important;
    box-shadow: var(--eq-shadow-card) !important;
}

/* avoid nested second plate effect */
.section .section_content_wrapper {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Global typography scale: ~1px smaller across site */
html {
    font-size: calc(0.5208333333vw - 1px) !important;
}

@media(min-width:192rem) {
    html {
        font-size: 9px !important;
    }
}

@media only screen and (max-width:120rem) {
    html {
        font-size: calc(0.80833333333vw - 1px) !important;
    }
}

@media only screen and (max-width:900px) {
    html {
        font-size: calc(0.81111111111vw - 1px) !important;
    }
}

@media only screen and (max-width:640px) {
    html {
        font-size: calc(2.77777777778vw - 1px) !important;
    }
}
