.maxsmart-consult-popup {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.maxsmart-consult-popup *,
.maxsmart-consult-popup *::before,
.maxsmart-consult-popup *::after {
    box-sizing: border-box;
}

.maxsmart-consult-popup[hidden] {
    display: none !important;
}

.maxsmart-consult-popup.is-active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.maxsmart-consult-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.maxsmart-consult-popup__dialog {
    position: relative;
    width: min(400px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(12px);
    transition: transform 0.2s ease;
}

.maxsmart-consult-popup.is-active .maxsmart-consult-popup__dialog {
    transform: translateY(0);
}

.maxsmart-consult-popup__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    color: #757575;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
}

.maxsmart-consult-popup__close span {
    display: block;
    line-height: 1px;
}

.maxsmart-consult-popup__close:hover,
.maxsmart-consult-popup__close:focus {
    color: #212121;
    background: #ffffff;
}

.maxsmart-consult-popup__image {
    width: 100%;
    aspect-ratio: 2 / 1;
    background: #f5f5f5;
}

.maxsmart-consult-popup__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.maxsmart-consult-popup__form-wrap {
    padding: 24px 16px 16px;
    background: #ffffff;
}

.maxsmart-consult-popup__title {
    margin: 0 0 24px;
    color: #212121;
    font-family: Inter, Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.38;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

.maxsmart-consult-popup__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.maxsmart-consult-popup__form input {
    width: 100%;
    height: 46px;
    padding: 10px 16px;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    background: #fafafa;
    color: #212121;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.5;
    outline: none;
}

.maxsmart-consult-popup__form input::placeholder {
    color: #757575;
    opacity: 1;
}

.maxsmart-consult-popup__form input:focus {
    border-color: #ef3737;
    background: #ffffff;
}

.maxsmart-consult-popup__form button {
    min-height: 48px;
    margin-top: 12px;
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: #ef3737;
    color: #ffffff;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
}

.maxsmart-consult-popup__form button:hover,
.maxsmart-consult-popup__form button:focus {
    background: #d92f2f;
}

.maxsmart-consult-popup__form button:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.maxsmart-consult-popup__form button.is-loading {
    background: #d92f2f;
}

.maxsmart-consult-popup__notice {
    display: none;
    width: 100%;
    margin-top: 2px;
    font-family: Inter, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
}

.maxsmart-consult-popup__notice.is-success,
.maxsmart-consult-popup__notice.is-error {
    display: block;
}

.maxsmart-consult-popup__notice.is-success {
    color: #168a3a;
}

.maxsmart-consult-popup__notice.is-error {
    color: #d92f2f;
}

.maxsmart-consult-popup__privacy {
    margin-top: 16px;
    color: #bdbdbd;
    font-family: Inter, Arial, sans-serif;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.4;
    letter-spacing: 0;
    text-align: center;
}

body.maxsmart-consult-popup-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .maxsmart-consult-popup {
        padding: 16px;
    }

    .maxsmart-consult-popup__close {
        width: 24px;
        height: 24px;
        font-size: 20px;
    }

    .maxsmart-consult-popup__form-wrap {
        padding: 20px 14px 14px;
    }

    .maxsmart-consult-popup__title {
        margin-bottom: 18px;
        font-size: 19px;
    }

    .maxsmart-consult-popup__form button {
        font-size: 17px;
    }
}
