@import url('https://fonts.googleapis.com/css2?family=Saira+Semi+Condensed:wght@400;500;600&display=swap');

:root {
    --wm-green: #16a34a;
    --wm-green-dark: #15803d;
    --wm-accent: #13224e;
    --wm-border: #d1d5db;
    --wm-icon: #9ca3af;
    --wm-text: #374151;
    --wm-muted: #6b7280;
    /* Troque por "inherit" se preferir a fonte do proprio site. */
    --wm-font: "Saira Semi Condensed", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* BLINDAGEM: neutraliza box-sizing e fonte herdada do site host.
   ".wm-modal *" (0,1,0) vence seletores de elemento como h3/p/input (0,0,1). */
.wm-modal,
.wm-modal *,
.wm-modal *::before,
.wm-modal *::after,
.wm-success,
.wm-success *,
.wm-success *::before,
.wm-success *::after,
.wm-fab,
.wm-fab * {
    box-sizing: border-box;
    font-family: var(--wm-font);
}

/* ---- Overlay / centralizacao ---- */
.wm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    overflow: auto;
    text-align: center;
}

.wm-modal.wm-open {
    display: block;
}

.wm-modal::before {
    content: "";
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

.wm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .8);
}

.wm-box {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    width: 488px;
    max-width: 95%;
    text-align: left;
    padding: 2rem 0;
}

.wm-card {
    background: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

/* ---- Cabecalho ---- */
.wm-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: var(--wm-green);
    color: #fff;
    padding: 2.75rem 3.25rem;
}

.wm-head>svg {
    width: 3.9rem;
    height: auto;
    fill: #fff;
    flex-shrink: 0;
}

.wm-head h3 {
    margin: 0;
    color: #fff;
    font-size: 2.05rem;
    font-weight: 600;
    line-height: 1.2;
}

/* color explicito: o host tem p{color:#333} que escurecia este texto */
.wm-head p {
    margin: .15rem 0 0;
    color: #fff;
    font-size: 1.32rem;
    font-weight: 500;
    line-height: 1.3;
}

.wm-close {
    margin-left: auto;
    flex-shrink: 0;
    padding: 0;
    line-height: 0;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    transition: opacity .2s;
}

.wm-close:hover {
    opacity: .8;
}

.wm-close svg {
    width: 1.4rem;
    height: 1.4rem;
}

/* ---- Formulario / campos ---- */
.wm-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin: 0;
    padding: 1.25rem;
}

.wm-field {
    position: relative;
}

.wm-field>svg {
    position: absolute;
    left: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    stroke: var(--wm-icon);
    pointer-events: none;
    transition: stroke .4s;
}

.wm-field.wm-top>svg {
    top: 1rem;
    transform: none;
}

/* font em longhand (o atalho "font: ... inherit" era invalido) */
.wm-field input,
.wm-field select,
.wm-field textarea {
    display: block;
    width: 100%;
    height: 36px;
    margin: 0;
    background: #fff;
    color: var(--wm-text);
    font-family: var(--wm-font);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1.2;
    border: 1px solid var(--wm-border);
    border-radius: 0;
    outline: none;
    box-shadow: none;
    padding: .25rem .75rem .25rem 3.35rem;
    transition: border-color .4s;
}

.wm-field textarea {
    height: 15rem;
    padding-top: .75rem;
    line-height: 1.5;
    resize: vertical;
}

.wm-field input:focus,
.wm-field select:focus,
.wm-field textarea:focus {
    border-color: var(--wm-green);
}

.wm-field input:focus~svg,
.wm-field textarea:focus~svg,
.wm-field select:focus~svg {
    stroke: var(--wm-green);
}

.wm-field ::placeholder {
    color: var(--wm-muted);
    opacity: 1;
}

/* ---- Botao / estados de envio ---- */
.wm-submit {
    display: block;
    width: 100%;
    margin-top: .25rem;
    padding: .75rem;
    background: #16a34a;
    background: var(--wm-green);
    color: #fff;
    font-family: var(--wm-font);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    transition: background .4s;
}

.wm-submit:hover {
    background: #15803d;
    background: var(--wm-green-dark);
}

.wm-submit:disabled {
    opacity: .7;
    cursor: default;
}

.wm-loading {
    display: none;
    margin: .25rem 0;
    text-align: center;
    font-size: .875rem;
    color: var(--wm-text);
}

.wm-loading.wm-show {
    display: block;
}

.wm-spin {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: middle;
    border: 3px solid #ccc;
    border-top-color: var(--wm-green);
    border-radius: 50%;
    animation: wm-spin 1s linear infinite;
}

@keyframes wm-spin {
    to {
        transform: rotate(360deg);
    }
}

.wm-alert {
    margin-top: .25rem;
    text-align: center;
    font-size: .8rem;
}

.wm-alert-err {
    color: #b91c1c;
}

/* ---- Multi-select (Vanilla) ---- */
.wm-ms {
    position: relative;
}

.wm-ms::after {
    content: "";
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--wm-icon);
    pointer-events: none;
    transition: transform .2s;
}

.wm-ms.wm-open-list::after {
    transform: translateY(-75%) rotate(180deg);
}

.wm-ms-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 36px;
    background: #fff;
    border: 1px solid var(--wm-border);
    cursor: pointer;
    padding: .25rem 2rem .25rem 3.25rem;
    font-size: 1.4rem;
    line-height: 1.2;
    color: var(--wm-text);
    transition: border-color .4s;
}

.wm-ms.wm-open-list .wm-ms-head {
    border-color: var(--wm-green);
}

.wm-ms-ph {
    color: var(--wm-muted);
}

.wm-ms-tag {
    background: #f3f4f7;
    padding: 2px 6px;
    font-size: 1.3rem;
    color: var(--wm-text);
}

.wm-ms-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 10;
    margin-top: 4px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    max-height: 40vh;
    overflow: auto;
}

.wm-ms.wm-open-list .wm-ms-list {
    display: block;
}

.wm-ms-opt {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--wm-text);
}

.wm-ms-opt:hover {
    background: #f3f4f7;
}

.wm-ms-opt .wm-check {
    position: relative;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1px solid #ced4da;
    background: #fff;
}

.wm-ms-opt.wm-sel .wm-check {
    background: var(--wm-green);
    border-color: var(--wm-green);
}

.wm-ms-opt.wm-sel .wm-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---- Modal de sucesso ---- */
.wm-success {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: rgba(0, 0, 0, .38);
}

.wm-success.wm-open {
    display: flex;
}

.wm-success-bg {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.wm-success-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 350px;
    padding: 1.5rem;
    background: #fff;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1);
    text-align: center;
}

.wm-success-x {
    position: absolute;
    top: 1rem;
    right: .75rem;
    padding: 0;
    background: none;
    border: 0;
    color: var(--wm-text);
    opacity: .6;
    cursor: pointer;
}

.wm-success-x:hover {
    opacity: .9;
}

.wm-success-ico {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--wm-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wm-success-ico svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
}

.wm-success h3 {
    margin: 0 0 .75rem;
    color: var(--wm-accent);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.wm-success p {
    margin: 0 0 1.5rem;
    color: #3e414b;
    font-size: 1rem;
    line-height: 1.6;
}

.wm-success .wm-submit {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    font-weight: 700;
}

/* ---- Botao flutuante (opcional) ----
   Cor fixa + variavel: fica verde mesmo se a variavel faltar. */
.wm-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 0;
    background: #16a34a;
    background: var(--wm-green);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background .4s;
}

.wm-fab:hover {
    background: #15803d;
    background: var(--wm-green-dark);
}

.wm-fab svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

@media (min-width:640px) {
    .wm-head h3 {
        font-size: 2.15rem;
    }

    .wm-form {
        padding: 1.5rem;
    }

    .wm-fab {
        width: 64px;
        height: 64px;
    }
}