/* ── WhatsApp Lead Widget – estilos fiéis ao original OBomAcordo ── */

/* ─── .zapicon – botão flutuante animado (igual ao original) ─── */
.wlw-zapicon {
    position: fixed;
    bottom: 0;
    z-index: 500;
    height: 150px;
    width: 120px;
    margin-left: calc(100% - 120px);
    animation: wlw-zapicon-anim 2s infinite;
    display: block;
    cursor: pointer;
}
@keyframes wlw-zapicon-anim {
    0%   { margin-left: calc(100% - 120px); }
    50%  { margin-left: calc(100% - 140px); }
    100% { margin-left: calc(100% - 120px); }
}
.wlw-zapicon img {
    padding: 20px;
    height: auto;
    max-width: 100%;
    cursor: pointer;
}
/* SVG fallback quando não há imagem configurada */
.wlw-zapicon svg {
    padding: 20px;
    width: 100%;
    height: auto;
    fill: #25d366;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.35));
}

/* ─── Modal customizations ─── */
#wlw-formmodal .modal-header {
    background-color: #fff;
    border-radius: 0;
}
#wlw-formmodal .modal-content {
    border-radius: 0;
}
#wlw-formmodal section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#wlw-formmodal .wlw-bubble {
    color: #000;
    background: #fff;
    border-radius: 8px;
    width: 75%;
}
#wlw-formmodal .modalInput {
    background-color: #E3FFE3;
    border: 0;
    border-radius: 8px;
}
#wlw-formmodal .btn-submit {
    background-color: #005849;
    color: #fff;
    border: 0;
}
#wlw-formmodal .btn-submit:hover {
    background-color: #003830;
    color: #fff;
}

/* ─── Slider captcha (CSS @property, igual ao original) ─── */
@property --val {
    syntax: '<integer>';
    inherits: true;
    initial-value: 0;
}

#wlw-captcha {
    padding-top: 1.5em;
}

#wlw-captcha > label {
    --c: #005849;
    --g: round(.3em,1px);
    --l: round(.1em,.8px);
    --s: round(.8em,.8px);
    --t: round(.8em,1px);
    --r: round(.8em,1px);
    timeline-scope: --thumb-view;
    position: relative;
    font-size: 24px;
    display: block;
}

#wlw-captcha > label > input {
    width: 100%;
    height: var(--s);
    --_c: color-mix(in srgb, var(--c), #005849 var(--p,0%));
    appearance: none;
    background: none;
    cursor: pointer;
    overflow: hidden;
    font-size: inherit;
}
#wlw-captcha > label > input:focus-visible,
#wlw-captcha > label > input:hover { --p: 25%; }
#wlw-captcha > label > input:active,
#wlw-captcha > label > input:focus-visible { --_b: var(--s); }

/* Chromium */
#wlw-captcha > label > input[type="range" i]::-webkit-slider-thumb {
    height: var(--s);
    aspect-ratio: 1;
    border-radius: 50%;
    box-shadow: 0 0 0 var(--_b,var(--l)) inset var(--_c);
    border-image: linear-gradient(90deg,var(--_c) 50%,#005849 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + var(--g));
    -webkit-appearance: none;
    appearance: none;
    transition: .3s;
    anchor-name: --thumb;
    view-timeline: --thumb-view inline;
}
/* Firefox */
#wlw-captcha > label > input[type="range"]::-moz-range-thumb {
    height: var(--s);
    width: var(--s);
    background: none;
    border-radius: 50%;
    box-shadow: 0 0 0 var(--_b,var(--l)) inset var(--_c);
    border-image: linear-gradient(90deg,var(--_c) 50%,#005849 0) 0 1/calc(50% - var(--l)/2) 100vw/0 calc(100vw + var(--g));
    -moz-appearance: none;
    appearance: none;
    transition: .3s;
    anchor-name: --thumb;
    view-timeline: --thumb-view inline;
}

#wlw-captcha > label > output {
    position-anchor: --thumb;
    position: absolute;
    position-area: top;
    inset: 0 -4em;
    color: #fff;
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
    padding-block: .1em;
    width: 3em;
    border-bottom: var(--t) solid #0000;
    border-radius: var(--r)/var(--r) var(--r) calc(var(--r) + var(--t)) calc(var(--r) + var(--t));
    --_m: 100%/var(--t) var(--t) no-repeat;
    --_g: 100%,#0000 99%,#000 102%;
    mask: linear-gradient(#000 0 0) padding-box,
          radial-gradient(100% 100% at 100% var(--_g)) calc(50% + var(--t)/2) var(--_m),
          radial-gradient(100% 100% at 0    var(--_g)) calc(50% - var(--t)/2) var(--_m);
    animation: wlw-range linear both;
    animation-timeline: --thumb-view;
    animation-range: entry 100% exit 0%;
}
#wlw-captcha > label > output.bottom {
    position-area: bottom;
    border-top: var(--t) solid #0000;
    border-bottom: none;
    border-radius: var(--r)/calc(var(--r) + var(--t)) calc(var(--r) + var(--t)) var(--r) var(--r);
    --_m: 0%/var(--t) var(--t) no-repeat;
    --_g: 0%,#0000 99%,#000 102%;
}
#wlw-captcha > label > output:before {
    content: counter(num);
    counter-reset: num var(--val);
}
@keyframes wlw-range {
    0%   { background: #8A9B0F; --val: var(--max); }
    100% { background: #CC333F; --val: var(--min); }
}
@supports not (anchor-name: ---) {
    #wlw-captcha > label > output { display: none; }
}

/* Alert helpers */
#wlw-formmodal .alert-nome,
#wlw-formmodal .alert-email,
#wlw-formmodal .alert-whatsapp,
#wlw-formmodal .alert-reason,
#wlw-formmodal .alert-captcha,
#wlw-formmodal .alert-result { display: none; }
