.wpp-modal__box,
.wpp-form,
.wpp-top-select,
.wpp-submit {
    font-family: 'Inter', sans-serif;
}

@keyframes wpp-ring-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wpp-ring-show {
    0%, 4% {
        opacity: 0;
    }
    8%, 58% {
        opacity: 1;
    }
    64%, 100% {
        opacity: 0;
    }
}

@keyframes wpp-trigger-pulse {
    0%, 4% {
        transform: scale(1);
    }
    8% {
        transform: scale(1.02);
    }
    24% {
        transform: scale(1.08);
    }
    40% {
        transform: scale(1.12);
    }
    58% {
        transform: scale(1);
    }
    64%, 100% {
        transform: scale(1);
    }
}

.wpp-widget {
    position: fixed;
    bottom: var(--wpp-offset-y);
    right: var(--wpp-offset-x);
    z-index: 99999;
    width: 206px;
    height: 173px;
    cursor: pointer;
}

.wpp-widget--no-hover {
    width: 80px;
    height: 80px;
}

.wpp-widget--no-hover .wpp-hover-box {
    display: none !important;
}

.wpp-trigger {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 80px;
    height: 80px;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    cursor: pointer;
    transition: opacity .24s ease;
    border-radius: 50%;
    overflow: visible;
    isolation: isolate;
    transform-origin: center;
    will-change: transform;
    animation: wpp-trigger-pulse 5.2s ease-in-out infinite;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.wpp-trigger img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    display: block;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    filter: none;
}

/* anel colorido girando */
.wpp-trigger::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #5B8CFF 0deg,
        #6A5CFF 70deg,
        #8A2BE2 160deg,
        #D61FFF 250deg,
        #5B8CFF 360deg
    );
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    animation:
        wpp-ring-spin 2.1s linear infinite,
        wpp-ring-show 5.2s ease-in-out infinite;
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* camada entre o anel e a imagem */
.wpp-trigger::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.wpp-hover-box {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 206px;
    height: 173px;
    opacity: 0;
    visibility: hidden;
    transform: scale(.88);
    transform-origin: bottom right;
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
    pointer-events: auto;
    z-index: 1;
}

.wpp-hover-card {
    position: relative;
    width: 206px;
    height: 173px;
    background: #F6FFF7;
    border: 2px solid #D8F8DF;
    border-radius: 24px;
    box-sizing: border-box;
}

.wpp-hover-title {
    position: absolute;
    top: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    line-height: 16px;
    letter-spacing: 4px;
    font-weight: 500;
    color: #0A9723;
}

.wpp-hover-qr {
    position: absolute;
    right: 14px;
    bottom: 13px;
    width: 124px;
    height: 124px;
}

.wpp-hover-qr img {
    width: 124px;
    height: 124px;
    object-fit: cover;
    display: block;
}

.wpp-widget:hover .wpp-hover-box {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* com QR: move o botão e esconde o anel */
.wpp-widget:not(.wpp-widget--no-hover):hover .wpp-trigger {
    animation: none !important;
    transform: translate(-145px, -38px) scale(1);
}

.wpp-widget:not(.wpp-widget--no-hover):hover .wpp-trigger::before,
.wpp-widget:not(.wpp-widget--no-hover):hover .wpp-trigger::after {
    opacity: 0 !important;
    animation-play-state: paused;
}

/* sem QR: nunca move */
.wpp-widget--no-hover:hover .wpp-trigger {
    animation: none !important;
    transform: none !important;
}

.wpp-modal {
    position: fixed;
    z-index: 100000;
    display: none;
    background: transparent;
    bottom: var(--wpp-offset-y);
    right: var(--wpp-offset-x);
}

.wpp-modal.is-open {
    display: block;
}

.wpp-modal__box {
    width: 494px;
    height: 412px;
    max-width: calc(100vw - 20px);
    background-color: #F6FFF7;
    background-image: url('../img/whatsapp-popup-bg.png');
    background-repeat: repeat;
    background-position: center;
    background-size: cover;
    border: 2px solid #A9E8B4;
    border-radius: 26px;
    box-shadow: 0 8px 25px rgba(41, 163, 64, 0.18);
    padding: 58px 52px 54px 53px;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

    .wpp-modal__close {
    position: absolute !important;
    top: 13px !important;
    right: 13px!important;
    width: 20px !important;
    height: 20px !important;
    border: none!important;
    background: transparent !important;
    cursor: pointer!important;
    padding: 0 !important;
    z-index: 10 !important;
}

.wpp-modal__close img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.wpp-top-select {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 18px;
}

.wpp-top-select__label {
    font-size: 18px;
    color: #000;
    font-weight: 400;
    white-space: nowrap;
}

.wpp-top-select {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    flex-wrap: wrap;
    max-width: 100%;
}

.wpp-top-select__label {
    font-size: 18px;
    color: #1f1f1f;
    margin: 0;
}

.wpp-top-select__field {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px !important;
    height: 1px;
    overflow: hidden;
}

.wpp-custom-select {
    position: relative;
    display: inline-block;
    min-width: 220px;
    max-width: 100%;
}

.wpp-custom-select__trigger {
    border: 0 !important;
    background: transparent !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #244029 !important;
    padding: 0 18px 0 0 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    line-height: 1.2 !important;
    transition: color 0.2s ease !important;
}

.wpp-custom-select__trigger:hover {
    color: #1c341f !important;
}

.wpp-custom-select__trigger:focus {
    outline: none !important;
}

.wpp-custom-select__text {
    display: inline-block !important;
}

.wpp-custom-select__arrow {
    width: 10px !important;
    height: 10px !important;
    border-right: 2px solid #496b4f !important;
    border-bottom: 2px solid #496b4f !important;
    transform: rotate(45deg) translateY(-2px) !important;
    transition: transform 0.2s ease !important;
    flex-shrink: 0 !important;
}

.wpp-custom-select.is-open .wpp-custom-select__arrow {
    transform: rotate(-135deg) translateY(-1px) !important;
}

.wpp-custom-select__menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #cfe8d3;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 30;
}

.wpp-custom-select.is-open .wpp-custom-select__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wpp-custom-select__option {
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    text-align: left !important;
    padding: 12px 14px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #244029 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, color 0.2s ease !important;
}

.wpp-custom-select__option:hover {
    background: #edf8ef !important;
}

.wpp-custom-select__option.is-active {
    background: #18B52F !important;
    color: #fff !important;
}

.wpp-custom-select.is-single-option .wpp-custom-select__arrow {
    display: none !important;
}

.wpp-custom-select.is-single-option .wpp-custom-select__trigger {
    padding-right: 0 !important;
    cursor: default !important;
}

.wpp-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    margin: 0 !important;
    width: 100% !important;
}

.wpp-modal__box form.wpp-form input.wpp-field[type="text"],
.wpp-modal__box form.wpp-form input.wpp-field[type="email"] {
    width: 100% !important;
    height: 56px !important;
    min-height: 56px !important;
    border: 1px solid #7EDC92 !important;
    border-radius: 8px !important;
    padding: 0 20px !important;
    background: #fff !important;
    box-sizing: border-box !important;
    font-size: 18px !important;
    color: #444 !important;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
    display: block !important;
}

.wpp-modal__box form.wpp-form input.wpp-field[type="text"]::placeholder,
.wpp-modal__box form.wpp-form input.wpp-field[type="email"]::placeholder {
    color: #6f6f6f !important;
    opacity: 1 !important;
}

.wpp-modal__box form.wpp-form input.wpp-field[type="text"]:focus,
.wpp-modal__box form.wpp-form input.wpp-field[type="email"]:focus {
    border: 1px solid #7EDC92 !important;
    outline: none !important;
    box-shadow: none !important;
}

.wpp-field:invalid {
    border-color: #e04b4b !important;
}

.wpp-submit {
    width: 250px !important;
    max-width: 100%;
    height: 54px;
    border: 0 !important;
    border-radius: 8px !important;
    background-color: #18B52F !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 18px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 17px;
    align-self: flex-end !important;
    transition: all 0.25s ease;
}

.wpp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(24, 181, 47, 0.25);
    background-color: #16a72b !important;
}

.wpp-submit__text {
    display: inline-block;
}

.wpp-submit__icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpp-submit__icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

@keyframes wpp-submit-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* quando o modal estiver aberto, some o efeito */
body.wpp-modal-open .wpp-trigger {
    animation: none !important;
    transform: none !important;
}

body.wpp-modal-open .wpp-trigger::before,
body.wpp-modal-open .wpp-trigger::after {
    opacity: 0 !important;
    animation-play-state: paused;
}

@media (min-width: 1024px) {
    .wpp-modal__close {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .wpp-widget {
        width: 80px !important;
        height: 80px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .wpp-hover-box,
    .wpp-widget__hover,
    .wpp-widget__content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .wpp-trigger {
        position: relative !important;
        right: auto !important;
        bottom: auto !important;
        width: 80px;
        height: 80px;
        transform-origin: center;
        animation: wpp-trigger-pulse 5.2s ease-in-out infinite;
    }

    .wpp-widget:hover .wpp-trigger,
    .wpp-widget--no-hover:hover .wpp-trigger {
        animation: none !important;
        transform: none !important;
    }

    .wpp-widget.is-mobile-right {
        right: var(--wpp-offset-x) !important;
        left: auto !important;
        bottom: var(--wpp-offset-y) !important;
    }

    .wpp-widget.is-mobile-left {
        left: var(--wpp-offset-x) !important;
        right: auto !important;
        bottom: var(--wpp-offset-y) !important;
    }

    .wpp-modal {
        left: 10px !important;
        right: 10px !important;
    }

    .wpp-modal__box {
        width: 100%;
        height: auto;
        min-height: auto;
        max-width: 100%;
        padding: 30px;
    }
    

    .wpp-field {
        height: 50px;
        font-size: 16px;
    }

    .wpp-submit {
        width: 100%;
        height: 50px;
        font-size: 17px;
    }
}