/* BoostHub modal shell extracted from main.css.
   Keep this file loaded after main.css. */

.bgModalWindow {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 100%;
    height: 100vh;
    opacity: .8;
    background: #1a293e;
    display: none;
    z-index: 2;
}

.bgModalWindow_active {
    display: block;
    z-index: 20000;
}

.wrapMw {
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    -webkit-box-shadow: 0 5px 20px #fe9900;
    box-shadow: 0 5px 20px #fe9900;
    border-radius: 18px;
    display: none;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mw {
    position: relative;
    padding: 37px 57px 41px 47px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.mw p {
    color: #000;
    font-weight: 600;
}

.mw__title {
    color: #152030;
    font-family: var(--bh-font-sans);
    font-weight: 800;
    font-size: 4rem;
    line-height: 1;
    text-align: left;
    max-width: 100%;
    width: 100%;
    margin: 0 0 .65em;
}

.mw__content {
    color: #000;
    margin: 0 0 20px;
    line-height: 1.2;
}

.wrapMw_login,
.wrapMw_signup {
    max-width: 370px;
}

.wrapMw_editStatus {
    max-width: 370px;
}

.wrapMw_сhangeAvatar {
    max-width: 400px;
}

.wrapMw_successPass {
    max-width: 500px;
}

.wrapMw_PayCashback {
    max-width: 500px;
}

.wrapMw_faq,
.wrapMw_review,
.wrapMw_vacancy,
.wrapMw_editInfo,
.wrapMw_editPass,
.wrapMw_funds {
    max-width: 654px;
}

.wrapMw_editStatus .mw {
    padding: 40px 35px 35px 35px;
}

.wrapMw_editInfo .mw {
    padding: 37px 49px 41px 39px;
}

.wrapMw_editPass .mw {
    padding: 37px 46px 14px 39px;
}

.wrapMw_funds .mw {
    padding: 37px 30px 14px 30px;
}

.wrapMw_review .mw {
    padding: 37px 49px 34px 39px;
}

.wrapMw_review .label {
    color: rgba(255, 255, 255, 0.92);
}

.wrapMw_review .rating__lbl {
    color: rgba(255, 255, 255, 0.92);
}

.wrapMw_review .wrapData_review_5 .cartChek_2___txt {
    color: rgba(255, 255, 255, 0.88);
}

.wrapMw_review .star {
    color: #fe9900;
}

.wrapMw_review .review-error {
    color: #ffb4b4;
    font-size: 1.3rem;
    margin-top: 6px;
    display: block;
}

.wrapBtnMwClose {
    position: absolute;
    top: 15px;
    right: 18px;
    width: 24px;
    height: 24px;
}

.btnMwClose {
    width: 24px;
    height: 24px;
    position: relative;
    padding: 0;
    display: block;
}

.btnMwClose .l1,
.btnMwClose .l2 {
    height: 2px;
    display: block;
    background: #b4b7bc;
    position: absolute;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
    margin: 0;
    top: 11px;
    left: -2px;
    width: 29px;
}

.btnMwClose .l2 {
    -webkit-transform: rotate(-45deg);
    -ms-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

[class^="wrapMw_"],
[class*=" wrapMw_"] {
    z-index: 20010 !important;
    pointer-events: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    overflow: hidden;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3e 100%);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

[class^="wrapMw_"] .mw,
[class*=" wrapMw_"] .mw {
    background: transparent;
    border-radius: 16px;
    padding: 40px 35px 35px 35px;
    position: relative;
}

[class^="wrapMw_"] .mw__title,
[class*=" wrapMw_"] .mw__title {
    color: #ffffff;
    font-size: 3.2rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[class^="wrapMw_"] .mw__content,
[class*=" wrapMw_"] .mw__content {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.5rem;
    line-height: 1.45;
    text-align: center;
}

[class^="wrapMw_"] .stBtnPayCashback,
[class*=" wrapMw_"] .stBtnPayCashback {
    background: linear-gradient(135deg, #fe9900 0%, #ffb84d 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(254, 153, 0, 0.35);
    max-width: 100%;
}

[class^="wrapMw_"] .label,
[class*=" wrapMw_"] .label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

[class^="wrapMw_"] .wrapData:has(.field:focus) .label,
[class*=" wrapMw_"] .wrapData:has(.field:focus) .label {
    color: #fe9900;
}

[class^="wrapMw_"] .field,
[class*=" wrapMw_"] .field {
    width: 100%;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0 18px;
    font-size: 1.5rem;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[class^="wrapMw_"] .field:focus,
[class*=" wrapMw_"] .field:focus {
    outline: none;
    border-color: #fe9900;
    box-shadow: 0 0 0 4px rgba(254, 153, 0, 0.2),
                0 4px 12px rgba(254, 153, 0, 0.3);
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.8);
}

[class^="wrapMw_"] .field:focus-visible,
[class*=" wrapMw_"] .field:focus-visible {
    outline: var(--bh-focus-ring-width) solid var(--bh-focus-ring-color);
    outline-offset: 2px;
}

[class^="wrapMw_"] .field::placeholder,
[class*=" wrapMw_"] .field::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.8;
}

[class^="wrapMw_"] .btnSend,
[class*=" wrapMw_"] .btnSend {
    background: linear-gradient(135deg, #fe9900 0%, #ffb84d 100%);
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    padding: 16px 30px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(254, 153, 0, 0.4),
                0 2px 6px rgba(254, 153, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[class^="wrapMw_"] .btnSend::before,
[class*=" wrapMw_"] .btnSend::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

[class^="wrapMw_"] .btnSend:hover,
[class*=" wrapMw_"] .btnSend:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 153, 0, 0.5),
                0 4px 10px rgba(254, 153, 0, 0.4);
    background: linear-gradient(135deg, #ffb84d 0%, #fe9900 100%);
}

[class^="wrapMw_"] .btnSend:hover::before,
[class*=" wrapMw_"] .btnSend:hover::before {
    left: 100%;
}

[class^="wrapMw_"] .btnSend:active,
[class*=" wrapMw_"] .btnSend:active {
    transform: translateY(0);
}

/* Не перекрашивать в чёрный при :focus с мыши — ломает ожидание от оранжевой CTA */
[class^="wrapMw_"] .btnSend:focus,
[class*=" wrapMw_"] .btnSend:focus {
    outline: none;
}

[class^="wrapMw_"] .btnSend:focus-visible,
[class*=" wrapMw_"] .btnSend:focus-visible {
    outline: var(--bh-focus-ring-width) solid var(--bh-focus-ring-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--bh-focus-ring-soft),
                0 4px 15px rgba(254, 153, 0, 0.4),
                0 2px 6px rgba(254, 153, 0, 0.3);
}

/* Без backdrop-filter: blur — иначе на /personal/ и др. страницах ЛК визуально «мылится»
   и фон, и сама модалка входа (баг композитинга / порядка слоёв). */
.bgModalWindow {
    background: rgba(10, 14, 22, 0.92);
}

[class^="wrapMw_"][style*="display: block"],
[class*=" wrapMw_"][style*="display: block"] {
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1 !important;
    visibility: visible !important;
}

/* ЛК «Редактировать профиль»: подпись чекбокса и hint под полем — читаемы на тёмной модалке */
.wrapMw_editInfo .wrapChekbox_editInfo .cartChek_2___txt {
    color: rgba(255, 255, 255, 0.92) !important;
}

.wrapMw_editInfo .fieldDesc {
    color: rgba(255, 255, 255, 0.58) !important;
}

@media screen and (max-width: 768px) {
    .mw__title {
        font-size: 3rem;
    }

    .mw {
        padding: 37px 47px 41px 37px;
    }
}

@media (max-width: 480px) {
    [class^="wrapMw_"] .mw,
    [class*=" wrapMw_"] .mw {
        padding: 30px 20px 25px 20px;
    }

    [class^="wrapMw_"] .mw__title,
    [class*=" wrapMw_"] .mw__title {
        font-size: 2.5rem;
    }
}

/* -------------------------------------------------------------------------
   Ram.calc: «добавлено в корзину» / ошибка — как тёмные модалки регистрации (wrapMw_*).
   Перекрывает main.css (.popup-window) и шаблонные правки ram.calc (#000 / оранжевый текст).
   ------------------------------------------------------------------------- */

.popup-window-overlay {
    background: rgba(10, 14, 22, 0.92) !important;
    opacity: 1 !important;
}

.popup-window.ram-calc__popup {
    background: linear-gradient(135deg, #1a2332 0%, #1e2a3e 100%) !important;
    border-radius: 16px !important;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) !important;
    padding: 40px 35px 35px 35px !important;
    border: none !important;
    max-width: min(420px, calc(100vw - 32px));
    box-sizing: border-box !important;
    font-family: var(--bh-font-sans, system-ui, -apple-system, sans-serif) !important;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-window.ram-calc__popup .popup-window-content {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 1.5rem !important;
    line-height: 1.45 !important;
    text-align: center !important;
    padding: 0 !important;
}

.popup-window.ram-calc__popup .popup-window-content a {
    display: inline-block !important;
    margin-top: 1.25em !important;
    padding: 14px 28px !important;
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf5a 100%) !important;
    color: #111b29 !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.2),
        0 1px 3px rgba(254, 153, 0, 0.25) !important;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease !important;
}

.popup-window.ram-calc__popup .popup-window-content a:hover {
    transform: translateY(-2px) !important;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.22),
        0 2px 6px rgba(254, 153, 0, 0.3) !important;
    color: #0a0e14 !important;
}

.popup-window.ram-calc__popup .popup-window-content a:visited {
    color: #111b29 !important;
}

.popup-window.ram-calc__popup .popup-window-content a:focus-visible {
    outline: var(--bh-focus-ring-width, 2px) solid var(--bh-focus-ring-color, #fe9900) !important;
    outline-offset: 3px !important;
}

.popup-window.ram-calc__popup .mw__title {
    color: #ffffff !important;
    font-size: 3.2rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    margin: 0 0 0.35em !important;
    text-align: center !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-family: var(--bh-font-sans, system-ui, -apple-system, sans-serif) !important;
}

.popup-window.ram-calc__popup .popup-window-close-icon {
    right: 14px !important;
    top: 14px !important;
    opacity: 0.65 !important;
}

.popup-window.ram-calc__popup .popup-window-close-icon:hover {
    opacity: 1 !important;
}

.popup-window.ram-calc__popup .popup-window-close-icon::after {
    filter: brightness(0) invert(1) !important;
}

@media (max-width: 480px) {
    .popup-window.ram-calc__popup {
        padding: 32px 22px 28px 22px !important;
    }

    .popup-window.ram-calc__popup .mw__title {
        font-size: 2.5rem !important;
    }

    .popup-window.ram-calc__popup .popup-window-content {
        font-size: 1.4rem !important;
    }

    .popup-window.ram-calc__popup .popup-window-content a {
        font-size: 1.45rem !important;
        padding: 12px 22px !important;
    }
}
