/* ============================================
   POPUP OVERLAY
   ============================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   POPUP
   ============================================ */

.popup {
    position: relative;
    background: #FFFFFF;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    min-width: 360px;
}

.popup-overlay.active .popup {
    transform: translateY(0);
}

/* Close Button */
.popup__close {
    position: absolute;
    top: 2px;
    right: 3px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #0B0C0E;
    transition: color 0.3s ease;
    padding: 0;
}

.popup__close:hover {
    color: #4778F5;
}

.popup__close svg {
    width: 32px;
    height: 32px;
}

/* ============================================
   POPUP CONTENT
   ============================================ */

.popup__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popup__title {
    font-family: 'Actay Wide', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 120%;
    letter-spacing: -0.02em;
    color: #0B0C0E;
}

.popup__description {
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    color: #000;
}

/* ============================================
   SUCCESS POPUP
   ============================================ */

.popup--success {
    max-width: 680px;
}

.popup__content--success {
    align-items: center;
    text-align: center;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 80px;
    height: 80px;
}

.popup__content--success .popup__title {
    margin: 0;
}

.popup__content--success .popup__description {
    margin-top: -16px;
}

.success-close {
    width: 129px;
}

/* ============================================
   MESSENGERS BUTTONS
   ============================================ */

.popup__messengers p{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.messenger-btn {
    padding: 16px 24px;
    background: #F7F7F8;
    border: none;
    cursor: pointer;
    font-family: 'Actay Wide', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 120%;
    color: #0B0C0E;
    transition: background 0.3s ease, color 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 51px;
}

.messenger-btn:hover {
    background: #4778F5;
    color: #FFFFFF;
}

.messenger-btn span {
    font-style: italic;
}

/* Divider Text */
.popup__divider-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    color: #0B0C0E;
    margin: 0;
    margin-bottom: 8px;
}

/* ============================================
   POPUP FORM
   ============================================ */

.popup__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form__field {
    width: 100%;
}

.popup__content .form__input,
.popup__content .form__textarea {
    width: 100%;
    padding: 16px 24px;
    background: #F7F7F8;
    border: none;
    outline: none;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    color: #0B0C0E;
    transition: background 0.3s ease;
}

.popup__content .form__input {
    height: 51px;
}

.popup__content .form__input::placeholder,
.popup__content .form__textarea::placeholder {
    color: #BDC3CE;
}

.popup__content .form__input:focus,
.popup__content.form__textarea:focus {
    background: #EEEFF1;
}

.popup__content.form__textarea {
    resize: vertical;
    min-height: 97px;
}

/* Checkbox */
.popup__content.form__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.popup__content .form__checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.popup__content .form__checkbox-box {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #F7F7F8;
    border: none;
    transition: background 0.3s ease;
}

.popup__content.form__checkbox-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.67 3.5L5.25 9.92L2.33 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease;
}

.popup__content.form__checkbox-input:checked+.form__checkbox-box {
    background: #4778F5;
}

.popup__content.form__checkbox-input:checked+.form__checkbox-box::after {
    transform: translate(-50%, -50%) scale(1);
}

.popup__content.form__checkbox-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    color: #0B0C0E;
}

.popup__content .form__checkbox-text a {
    color: #4778F5;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.popup__content .form__checkbox-text a:hover {
    color: #3A6BE7;
}

.popup__content.form__submit {
    margin-top: 8px;
    width: auto;
    align-self: flex-start;
}

.checkbox--white {
    color: #1a1a1a;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
    .popup {
        padding: 40px 32px;
    }

    .popup__title {
        font-size: 36px;
    }

    .popup__content {
        gap: 24px;
    }

    .popup__content--success .popup__description {
        margin-top: -8px;
    }

    .popup__description {
        margin-top: -8px;
    }

    .popup__content .form__submit {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .popup-overlay {
        padding: 0px;
        align-items: end;
    }

    .popup--success {
        height: 630px;
    }

    .popup {
        padding: 32px 20px;
    }

    .popup__close {
        width: 36px;
        height: 36px;
    }

    .popup__title {
        font-size: 28px;
    }

    .popup__description {
        font-size: 14px;
    }

    .success-icon svg {
        width: 60px;
        height: 60px;
    }

    .messenger-btn {
        font-size: 14px;
    }

    .popup__divider-text {
        font-size: 14px;
    }

    .popup__content .form__input,
    .popup__content .form__textarea {
        padding: 14px 16px;
        font-size: 15px;
    }

    .popup__content .form__input {
        height: 52px;
    }

    .popup__content .form__checkbox {
        margin-top: 4px;
    }

    .popup__content .form__checkbox-text {
        font-size: 14px;
    }

    .popup__content .form__submit {
        margin-top: 4px;
    }

    .popup__divider-text {
        margin-bottom: 0px;
    }

    .popup__content .form__submit {
        font-size: 16px;
    }


    .messenger-btn {
        max-width: 98px;
    }
}

@media (max-width: 400px) {
    .popup {
        padding: 32px 16px;
    }

    .popup__content .form__input,
    .popup__content .form__textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    .popup__content .form__input {
        height: 48px;
    }



}