.floating-whatsapp {
    position: fixed;
    z-index: 45;
    right: 22px;
    bottom: max(22px, env(safe-area-inset-bottom));
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1fac5b;
    color: #fff;
    box-shadow: 0 12px 28px rgba(20, 121, 68, .25);
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition: opacity .28s ease, transform .34s cubic-bezier(.22, .8, .3, 1), box-shadow .2s ease;
    will-change: transform, opacity;
}

.floating-whatsapp:hover {
    transform: translate3d(0, -2px, 0) scale(1.04);
    box-shadow: 0 16px 32px rgba(20, 121, 68, .32);
}

.floating-whatsapp svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.floating-whatsapp.is-top-hidden,
.analysis-open .floating-whatsapp {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(.82);
    pointer-events: none;
}

.analysis-popup {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.analysis-popup[hidden] {
    display: none;
}

.analysis-popup.is-open {
    opacity: 1;
    visibility: visible;
}

.analysis-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 14, 21, .48);
    backdrop-filter: blur(5px);
}

.analysis-dialog {
    position: relative;
    width: min(100%, 390px);
    max-height: calc(100svh - 28px);
    overflow: auto;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 22px;
    background: #fff;
    color: #111820;
    box-shadow: 0 28px 75px rgba(6, 15, 27, .22);
    transform: translate3d(0, 14px, 0) scale(.985);
    transition: transform .3s cubic-bezier(.22, .8, .3, 1);
    font-family: 'DM Sans', Arial, sans-serif;
    text-align: start;
}

.analysis-popup.is-open .analysis-dialog {
    transform: none;
}

.analysis-close {
    position: absolute;
    z-index: 2;
    top: 13px;
    right: 13px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f2f4f5;
    color: #18202a;
    cursor: pointer;
}

.analysis-close svg {
    width: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.analysis-dialog h2 {
    max-width: calc(100% - 35px);
    margin: 0 0 21px;
    color: #111820;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.analysis-form {
    display: grid;
}

.analysis-form label {
    margin: 10px 0 7px;
    font-size: 12px;
    font-weight: 700;
}

.analysis-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid #d8dfe4;
    border-radius: 11px;
    background: #fff;
    color: #111820;
    font: inherit;
    outline: none;
}

.analysis-form input:focus {
    border-color: #586a7c;
    box-shadow: 0 0 0 3px rgba(77, 102, 126, .1);
}

.analysis-form input.is-invalid {
    border-color: #c94d4d;
}

.analysis-field-error {
    min-height: 15px;
    margin: 4px 0 0 !important;
    color: #b63b3b !important;
    font-size: 11px !important;
    line-height: 1.3;
}

.analysis-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
    margin-top: 10px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #111820;
    color: #fff;
    font: 600 13px/1 'DM Sans', Arial, sans-serif;
    cursor: pointer;
    transition: transform .2s ease, opacity .2s ease;
}

.analysis-submit:hover {
    transform: translateY(-1px);
}

.analysis-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.analysis-submit svg {
    width: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.analysis-status {
    min-height: 16px;
    margin: 8px 0 0 !important;
    color: #b63b3b !important;
    font-size: 11px !important;
    line-height: 1.35;
    text-align: center;
}

.analysis-status:empty {
    min-height: 0;
    margin-top: 0 !important;
}

.analysis-status.is-success {
    color: #187344 !important;
}

body.analysis-open {
    overflow: hidden;
}

[dir='rtl'] .analysis-close {
    right: auto;
    left: 13px;
}

[dir='rtl'] .analysis-submit svg {
    transform: rotate(180deg);
}

@media (max-width: 720px) {
    .floating-whatsapp {
        right: 14px;
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 44px;
        height: 44px;
    }

    .floating-whatsapp svg {
        width: 23px;
        height: 23px;
    }

    .analysis-popup {
        align-items: end;
        padding: 9px;
    }

    .analysis-dialog {
        width: 100%;
        max-height: calc(100svh - 10px);
        padding: 23px 19px 18px;
        border-radius: 20px;
    }

    .analysis-dialog h2 {
        margin-bottom: 17px;
        font-size: clamp(28px, 8.2vw, 34px);
    }

    .analysis-close {
        top: 11px;
        right: 11px;
    }

    [dir='rtl'] .analysis-close {
        right: auto;
        left: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-whatsapp,
    .analysis-popup,
    .analysis-dialog,
    .analysis-submit {
        transition: none !important;
    }
}
