/* ============================================================
   Reemake Callback — фронт
   ============================================================ */

html.qf-cb-locked,
body.qf-cb-locked { overflow: hidden !important; }

#reemake-callback-modal {
    position: fixed; inset: 0;
    background: rgba(11, 11, 14, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center; align-items: center;
    z-index: 99999;
    padding: 20px;
    opacity: 0;
    transition: opacity .28s ease;
}
#reemake-callback-modal.is-open { display: flex; }
#reemake-callback-modal.is-visible { opacity: 1; }

#reemake-callback-modal .rc-modal-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 92vh;
    overflow-y: auto;
    background:
        radial-gradient(140% 100% at 100% 0%, rgba(255,168,60,.06) 0%, rgba(255,168,60,0) 55%),
        linear-gradient(180deg, #1b1819 0%, #141113 100%);
    border: 1px solid rgba(255,168,60,.18);
    border-radius: 22px;
    padding: 40px 34px 34px;
    box-shadow:
        0 30px 80px -30px rgba(0,0,0,.95),
        0 0 0 1px rgba(255,168,60,.05),
        inset 0 1px 0 rgba(255,255,255,.05);
    transform: translateY(14px) scale(.97);
    transition: transform .32s cubic-bezier(.34,1.56,.64,1);
    color: #e6e6ec;
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
}
#reemake-callback-modal.is-visible .rc-modal-box {
    transform: translateY(0) scale(1);
}

/* ===== Тряска карточки при ошибке ===== */
@keyframes rc-shake {
    0%, 100% { transform: translateX(0) translateY(0) scale(1); }
    20% { transform: translateX(-7px) translateY(0) scale(1); }
    40% { transform: translateX(7px) translateY(0) scale(1); }
    60% { transform: translateX(-5px) translateY(0) scale(1); }
    80% { transform: translateX(5px) translateY(0) scale(1); }
}
#reemake-callback-modal .rc-modal-box.rc-shake {
    animation: rc-shake .5s cubic-bezier(.36,.07,.19,.97) both;
}

/* ===== Кнопка закрытия ===== */
#reemake-callback-modal .rc-modal-close {
    position: absolute;
    top: 12px; right: 14px;
    width: 36px; height: 36px;
    background: transparent !important;
    border: 0 !important;
    color: #8a8a94;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 10px;
    padding: 0 !important;
    transition: color .2s, background .2s;
    box-shadow: none !important;
}
#reemake-callback-modal .rc-modal-close:hover {
    color: #FFC63D;
    background: rgba(255,255,255,.04) !important;
}

/* ===== Заголовок ===== */
#reemake-callback-modal .rc-form-header {
    margin: 0 0 24px;
    text-align: center;
}
#reemake-callback-modal .rc-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff !important;
    letter-spacing: -.01em;
    line-height: 1.2;
    text-align: center;
}

/* ===== Подпись над вкладками ===== */
#reemake-callback-modal .rc-channels-label {
    font-size: 12px;
    line-height: 1.4;
    color: #8a8a94;
    margin: 0 4px 8px;
    letter-spacing: 0.02em;
}

/* ===== Вкладки «Телефон / E-mail» ===== */
#reemake-callback-modal .rc-channels {
    display: flex;
    gap: 10px;
    margin: 0 0 14px;
}

#reemake-callback-modal .rc-channel {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 12px !important;
    color: #8a8a94 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    cursor: pointer;
    transition: border-color .22s ease, background .22s ease, color .22s ease, box-shadow .22s ease;
    box-shadow: none !important;
    text-transform: none !important;
    text-shadow: none !important;
    height: auto !important;
    min-height: 46px !important;
    position: relative;
    overflow: hidden;
}
#reemake-callback-modal .rc-channel:hover {
    border-color: rgba(255, 168, 60, 0.35) !important;
    color: #e6e6ec !important;
}
#reemake-callback-modal .rc-channel.is-active {
    background: rgba(255, 138, 43, 0.14) !important;
    border-color: rgba(255, 168, 60, 0.65) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.08) !important;
}
#reemake-callback-modal .rc-channel.is-active::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 9px;
    width: 6px;
    height: 6px;
    background: #FF8A2B;
    border-radius: 50%;
    box-shadow: 0 0 8px #FF8A2B;
}

#reemake-callback-modal .rc-channel-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    opacity: .9;
}

/* ===== Поля ===== */
#reemake-callback-modal .rc-field {
    margin: 0 0 14px;
}

#reemake-callback-modal input[type="text"],
#reemake-callback-modal input[type="email"],
#reemake-callback-modal input[type="tel"],
#reemake-callback-modal textarea {
    display: block;
    width: 100% !important;
    min-height: 50px !important;
    max-width: 100% !important;
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    height: auto !important;
}
#reemake-callback-modal textarea {
    min-height: 88px !important;
    resize: vertical;
}
#reemake-callback-modal input::placeholder,
#reemake-callback-modal textarea::placeholder {
    color: rgba(255, 255, 255, 0.32) !important;
    opacity: 1 !important;
}
#reemake-callback-modal input:focus,
#reemake-callback-modal textarea:focus {
    border-color: rgba(255, 168, 60, 0.65) !important;
    background: rgba(255, 168, 60, 0.055) !important;
    box-shadow: 0 0 0 4px rgba(255, 168, 60, 0.08) !important;
}

/* ===== Поле с ошибкой ===== */
#reemake-callback-modal input.rc-invalid,
#reemake-callback-modal textarea.rc-invalid {
    border-color: rgba(255, 128, 128, 0.75) !important;
    background: rgba(255, 128, 128, 0.06) !important;
    box-shadow: 0 0 0 4px rgba(255, 128, 128, 0.12) !important;
}

/* ===== Чекбокс ===== */
#reemake-callback-modal .rc-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 4px 0 0;
    margin: 4px 0 12px;
}

#reemake-callback-modal .rc-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
    flex: 0 0 22px;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 6px !important;
    cursor: pointer;
    position: relative;
    top: 0;
    transition: border-color .2s, background .2s, box-shadow .2s;
    outline: none;
    box-shadow: none !important;
}
#reemake-callback-modal .rc-checkbox input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(255, 138, 43, 0.18) !important;
}
#reemake-callback-modal .rc-checkbox input[type="checkbox"]:checked {
    border-color: #FF8A2B !important;
    background: rgba(255, 138, 43, 0.14) !important;
    box-shadow: 0 0 0 3px rgba(255, 138, 43, 0.10) !important;
}
#reemake-callback-modal .rc-checkbox input[type="checkbox"]::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF8A2B' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12.5l4.5 4.5L19.5 6.5'/></svg>");
    background-size: 74%;
    background-position: center;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 4px rgba(255, 138, 43, 0.55));
    opacity: 0;
    transform: scale(0.5);
    transition: opacity .18s ease, transform .22s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
#reemake-callback-modal .rc-checkbox input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: scale(1);
}

#reemake-callback-modal .rc-checkbox label {
    font-size: 13px;
    line-height: 22px;
    color: #b8b8c0 !important;
    cursor: pointer;
    user-select: none;
    padding: 0;
    margin: 0;
}
#reemake-callback-modal .rc-checkbox label .rc-req {
    color: #FF8A2B;
    margin-left: 2px;
}

/* ===== Чекбокс с ошибкой ===== */
#reemake-callback-modal .rc-checkbox.rc-invalid input[type="checkbox"] {
    border-color: rgba(255, 128, 128, 0.9) !important;
    background: rgba(255, 128, 128, 0.08) !important;
    box-shadow: 0 0 0 4px rgba(255, 128, 128, 0.14) !important;
    animation: rc-pulse 1.2s ease-in-out infinite;
}
#reemake-callback-modal .rc-checkbox.rc-invalid label {
    color: #ff8080 !important;
}
#reemake-callback-modal .rc-checkbox.rc-invalid label .rc-req {
    color: #ff8080 !important;
}

@keyframes rc-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 128, 128, 0.14); }
    50%      { box-shadow: 0 0 0 7px rgba(255, 128, 128, 0.06); }
}

/* ===== Текст про политику ===== */
#reemake-callback-modal .rc-privacy-text {
    font-size: 12px;
    line-height: 1.55;
    color: #8a8a94;
    margin: 4px 0 16px;
}
#reemake-callback-modal .rc-privacy-text a {
    color: #FFC63D !important;
    text-decoration: none !important;
    border-bottom: 1px dashed rgba(255,198,61,.4);
}
#reemake-callback-modal .rc-privacy-text a:hover {
    border-bottom-color: #FFC63D;
}

/* ===== Кнопка ===== */
#reemake-callback-modal .rc-submit {
    display: block;
    width: 100% !important;
    padding: 17px 24px !important;
    background: linear-gradient(135deg, #FF8A2B 0%, #FFC63D 100%) !important;
    color: #1b1819 !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-family: 'Open Sans', system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 14px 32px -14px rgba(255, 138, 43, 0.6) !important;
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
    margin: 14px 0 0 0 !important;
    text-transform: none !important;
    text-shadow: none !important;
    line-height: 1.2 !important;
    height: auto !important;
}
#reemake-callback-modal .rc-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 20px 42px -14px rgba(255, 138, 43, 0.85) !important;
}
#reemake-callback-modal .rc-submit:disabled {
    cursor: default;
    filter: grayscale(.3) brightness(.8);
    transform: none;
}

/* ===== Плашка сообщения ===== */
#reemake-callback-modal .rc-form-message {
    margin-top: 14px;
    padding: 12px 14px 12px 44px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    display: none;
    border: 1px solid transparent;
}
#reemake-callback-modal .rc-form-message::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}
#reemake-callback-modal .rc-form-message.is-error {
    display: block;
    color: #ffb3b3;
    background: rgba(255, 80, 80, 0.08);
    border-color: rgba(255, 80, 80, 0.28);
}
#reemake-callback-modal .rc-form-message.is-error::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff8080' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='8' x2='12' y2='12'/><line x1='12' y1='16' x2='12.01' y2='16'/></svg>");
}
#reemake-callback-modal .rc-form-message.is-success {
    display: block;
    color: #b8f0c8;
    background: rgba(80, 200, 120, 0.08);
    border-color: rgba(80, 200, 120, 0.28);
}
#reemake-callback-modal .rc-form-message.is-success::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ad19b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M8 12.5l2.5 2.5L16 9.5'/></svg>");
}

#reemake-callback-modal .rc-captcha {
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

/* ===== Состояние «успех» ===== */
#reemake-callback-modal.is-done .rc-field,
#reemake-callback-modal.is-done .rc-privacy-text,
#reemake-callback-modal.is-done .rc-checkbox,
#reemake-callback-modal.is-done .rc-submit,
#reemake-callback-modal.is-done .rc-captcha,
#reemake-callback-modal.is-done .rc-channels,
#reemake-callback-modal.is-done .rc-channels-label { display: none; }
#reemake-callback-modal.is-done .rc-form-message {
    display: block;
    color: #e6e6ec;
    font-size: 16px;
    line-height: 1.55;
    padding: 16px 18px 16px 50px;
    background: rgba(80, 200, 120, 0.08);
    border-color: rgba(80, 200, 120, 0.28);
}
#reemake-callback-modal.is-done .rc-form-message::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237ad19b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M8 12.5l2.5 2.5L16 9.5'/></svg>");
    width: 22px;
    height: 22px;
    left: 16px;
}

/* ===== Адаптив ===== */
@media (max-width: 480px) {
    #reemake-callback-modal { padding: 12px; }
    #reemake-callback-modal .rc-modal-box {
        padding: 34px 22px 26px;
        border-radius: 18px;
        max-height: 94vh;
    }
    #reemake-callback-modal .rc-title { font-size: 22px; }
    #reemake-callback-modal input[type="text"],
    #reemake-callback-modal input[type="email"],
    #reemake-callback-modal input[type="tel"],
    #reemake-callback-modal textarea { min-height: 48px !important; font-size: 15px !important; }
    #reemake-callback-modal .rc-submit { padding: 16px 22px !important; }
    #reemake-callback-modal .rc-channel { font-size: 13px !important; padding: 11px 10px; min-height: 44px !important; }
}