/* =========================
   GORSKY FORM — CLEAN (stable)
   ========================= */

/* Общие настройки */
#gc_form,
#gc_form *{
    font-family: 'SF Regular', sans-serif;
    box-sizing: border-box;
}

#gc_form{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 0;

    transition: opacity .35s ease;
}

.gc_phone_field,
.gc_bottom_container,
.gc_privacy_field{
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0;
}

/* Wrapper (держит место для overlay успеха) */
.gc_form_wrapper{
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    position: relative;
    min-height: 45px;
}

/* =========================
   Поле телефона
   ========================= */

.gc_cc_wrap{
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    border-radius: 50px;
    transition: border-color .15s, box-shadow .15s;
}

.gc_cc_wrap:focus-within{
    border-color: #306fdb;
    box-shadow: 0 0 0 3px rgba(48,111,219,.25);
}

.gc_cc_wrap.gc_invalid{
    border-color: #e53935 !important;
    box-shadow: none !important;
}

.gc_cc_left,
.gc_cc_field,
.gc_cc_input,
.gc_cc_right,
.gc_phone_input{
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Левая часть */
.gc_cc_left{
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 100%;
    position: relative;
    line-height: 1;
}

.gc_cc_left::after{
    content: '';
    position: absolute;
    right: 0;
    top: 9px;
    bottom: 9px;
    width: 1px;
    background: rgba(0,0,0,.15);
}

/* Флаг */
.gc_flag{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 17px;
    line-height: 1;
}

/* Код страны */
.gc_cc_field{
    display: flex;
    align-items: center;
    min-width: 50px;
}

/* Символы */
.gc_plus,
.gc_cc_input,
.gc_phone_input{
    color: #555 !important;
    font-family: 'SF Regular', sans-serif !important;
    font-size: 15px !important;
    font-weight: 400 !important;
}

.gc_cc_input{
    text-align: center;
    width: 36px;
    padding: 0;
    outline: none;
}

.gc_plus{
    opacity: 0;
    width: 0;
    margin: 0;
    transition: opacity .12s, width .12s, margin .12s;
}

.gc_cc_field.has_cc .gc_plus{
    opacity: 1;
    width: auto;
    margin-right: 4px;
}

/* Правая часть */
.gc_cc_right{
    flex: 1;
    display: flex;
    align-items: center;
}

.gc_phone_input{
    width: 100%;
    padding: 0 16px;
    text-align: center;
    outline: none;
}

.gc_phone_input::placeholder{
    color: #555 !important;
    font-size: 15px !important;
}

/* =========================
   Кнопка
   ========================= */

#gc_submit{
    width: 360px;
    max-width: 100%;
    height: 45px;
    border: none;
    border-radius: 50px;
    background: #306fdb;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s;
    display: block;
    margin: 0 auto;
}

#gc_submit:hover{
    background: #275ac0;
}

/* =========================
   Privacy (fixed: no jumping)
   ========================= */

.gc_privacy{
    display: flex;
    gap: 10px;
    font-size: 13px;
    color: #555;
    justify-content: center;
    align-items: center; /* было flex-start → могло прыгать */
}

.gc_privacy input[type="checkbox"]{
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    flex-shrink: 0;

    /* главное: фиксируем baseline, чтобы не прыгало */
    margin: 0;

    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(10,0,0,0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .15s;
}

.gc_privacy input[type="checkbox"]:checked::after{
    content: "✓";
    font-size: 14px;
    line-height: 1;
    color: #0BDA51;
}

.gc_privacy input[type="checkbox"].gc_privacy_error{
    border-color: #e53935 !important;
}

.gc_privacy_text{
    font-size: 13px;
    color: #555;
    line-height: 1.2em;
    text-align: center;
}

.gc_privacy_text a{
    color: #555;
    text-decoration: underline;
}

.gc_privacy_text a:hover{
    text-decoration: none;
}

/* =========================
   DESKTOP: как на макете
   ========================= */

@media (min-width: 981px){
    /* поле и кнопка оставляем 360 */
    .gc_phone_field{
        max-width: 360px;
    }

    /* подписи расширяем, чтобы влезли в 1 строку */
    .gc_privacy_field,
    .gc_bottom_container{
        max-width: 680px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        white-space: nowrap;
    }

    .gc_privacy{
        white-space: nowrap;
        flex-wrap: nowrap;
    }

    .gc_privacy_text{
        white-space: nowrap;
    }

    .gc_privacy_field{
        margin-bottom: 25px;
    }
}

/* =========================
   SUCCESS OVERLAY (JS creates #gc_success_overlay)
   ========================= */

#gc_success_overlay{
    transform: translateY(20px);
}