﻿/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green: #3a7d44;
    --green-light: #5aa858;
    --green-pale: #e8f5ea;
    --green-bg: #f3faf4;
    --accent: #f0a500;
    --text: #1a2e1b;
    --text-muted: #5c705e;
    --border: #cee0d0;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(58,125,68,.10);
    --shadow-md: 0 8px 32px rgba(58,125,68,.14);
    --radius: 14px;
    --radius-sm: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--green-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== STEPPER ===== */
.stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 10px 24px; /* era 14px 24px */
    /*position: sticky;*/
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.95);
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Syne', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: #a8bfaa;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color .3s;
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    transition: all .3s;
}

.step.done {
    color: var(--green);
}

    .step.done .step-num {
        background: var(--green);
        color: #fff;
        border-color: var(--green);
    }

.step.active {
    color: var(--green-light);
}

    .step.active .step-num {
        border-color: var(--green-light);
        background: var(--green-pale);
    }

.step-line {
    width: 48px;
    height: 2px;
    background: var(--border);
    margin: 0 4px;
    border-radius: 2px;
}

    .step-line.done {
        background: var(--green);
    }

/* ===== LAYOUT ===== */
.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 20px 60px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 10px 0 10px; /* era 20px 0 18px */
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px; /* era 22px */
}

/* ===== HERO BRAND ===== */
.hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--green);
    color: #fff;
    padding: 10px 22px 10px 14px;
    border-radius: 999px;
    margin-bottom: 6px; /* era 10px */
    box-shadow: 0 4px 18px rgba(58,125,68,.30);
}

.hero-brand-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .hero-brand-icon svg {
        width: 18px;
        height: 18px;
        color: #7ed957;
    }

.hero-brand-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-brand-logo {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: .10em;
}

.hero-brand-sep {
    opacity: .35;
    font-size: .9rem;
}

.hero-brand-sub {
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .04em;
    opacity: .92;
}

.hero-desc {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.5;
    min-height: 1.2em; /* reserva espa�o mesmo quando lblTitulo estiver vazio */
}

.hero-badge {
    display: inline-block;
    background: var(--green-pale);
    color: var(--green);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 10px;
}

    .hero h1 .accent {
        color: var(--green);
        display: block;
        font-weight: 400;
        font-size: 80%;
    }

.hero p {
    color: var(--text-muted);
    font-size: .95rem;
}

/* ===== CARD ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 28px 24px;
    animation: fadeUp .5s .1s ease both;
}

/* ===== FORM ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    margin-bottom: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .field.full {
        grid-column: 1 / -1;
    }

label {
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: .02em;
}

.req {
    color: var(--green);
}

.select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .select-wrap select {
        width: 100%;
        appearance: none;
        background: var(--green-bg);
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 10px 36px 10px 12px;
        font-family: 'DM Sans', sans-serif;
        font-size: .9rem;
        color: var(--text);
        cursor: pointer;
        transition: border-color .2s, box-shadow .2s;
        outline: none;
    }

        .select-wrap select:hover {
            border-color: var(--green-light);
        }

        .select-wrap select:focus {
            border-color: var(--green);
            box-shadow: 0 0 0 3px rgba(90,168,88,.18);
        }

.chevron {
    position: absolute;
    right: 12px;
    font-size: 1.1rem;
    color: var(--green);
    pointer-events: none;
    line-height: 1;
}

/* ===== HINT ===== */
.hint {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.6;
    border-left: 3px solid var(--green-pale);
    padding-left: 12px;
    margin-bottom: 22px;
}

    .hint a {
        color: var(--green);
        font-weight: 500;
        text-decoration: none;
    }

        .hint a:hover {
            text-decoration: underline;
        }

/* ===== BUTTON ===== */
.btn-search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 14px 24px;
    font-family: 'Syne', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 16px rgba(58,125,68,.25);
}

    .btn-search svg {
        width: 18px;
        height: 18px;
    }

    .btn-search:hover {
        background: var(--green-light);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(58,125,68,.30);
    }

    .btn-search:active {
        transform: translateY(0);
    }

/* ===== RESULTS ===== */
.results-section {
    animation: fadeUp .5s .15s ease both;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(255,255,255,.8);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 11px 15px;
    font-size: .9rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

    .location-tag strong {
        color: var(--text);
    }

    .location-tag svg {
        width: 18px;
        height: 18px;
        color: var(--green);
    }

    .location-tag svg {
        width: 16px;
        height: 16px;
    }

    .location-tag strong {
        color: var(--text);
    }

.btn-export {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid var(--green);
    color: var(--green);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-family: 'Syne', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: all .2s;
}

    .btn-export svg {
        width: 15px;
        height: 15px;
    }

    .btn-export:hover {
        background: var(--green);
        color: #fff;
    }

/* ===== DISTRIBUTOR CARDS ===== */
.distributor-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.distributor-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 20px 16px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 14px;
    transition: box-shadow .2s, transform .2s;
    animation: fadeUp .4s ease both;
    position: relative;
    padding-top: 36px; /* espa�o da faixa */
}

    .distributor-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.dist-icon {
    font-size: 1.8rem;
    line-height: 1;
    background: var(--green-pale);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dist-info {
    min-width: 0;
}

    .dist-info h3 {
        font-family: 'Syne', sans-serif;
        font-size: .95rem;
        font-weight: 700;
        color: var(--text);
        margin-bottom: 10px;
        line-height: 1.3;
    }

.dist-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .dist-details li {
        display: flex;
        align-items: flex-start;
        gap: 7px;
        font-size: .83rem;
        color: var(--text-muted);
        line-height: 1.4;
    }

        .dist-details li svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
            margin-top: 1px;
            color: var(--green-light);
        }

    .dist-details a {
        color: var(--green);
        text-decoration: none;
        font-weight: 500;
        word-break: break-all;
    }

        .dist-details a:hover {
            text-decoration: underline;
        }

.dist-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Syne', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    border: 1.5px solid transparent;
}

    .btn-action svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }

.btn-map {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

    .btn-map:hover {
        background: var(--green-light);
        border-color: var(--green-light);
    }

.btn-call {
    background: transparent;
    color: var(--green);
    border-color: var(--green);
}

    .btn-call:hover {
        background: var(--green);
        color: #fff;
    }

.btn-email {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

    .btn-email:hover {
        border-color: var(--green);
        color: var(--green);
    }

.dist-cta {
    font-family: 'Syne', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    color: var(--green);
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--green-pale);
    border: 1px solid var(--border);
    transition: all .2s;
    align-self: flex-end;
}

    .dist-cta:hover {
        background: var(--green);
        color: #fff;
    }

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 20px;
    font-size: .78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: 1;
    }

    .distributor-card {
        grid-template-columns: auto 1fr;
    }

    .dist-cta {
        grid-column: 1 / -1;
        text-align: center;
    }

    .stepper {
        gap: 4px;
    }

    .step-line {
        width: 24px;
    }

    .step-label {
        display: none;
    }
}


body.modal-open {
    overflow: hidden;
}

.dist-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-site {
    border-color: #cfe0ff;
    color: #2457a6;
    background: #f6f9ff;
}

    .btn-site:hover {
        background: #eef4ff;
        border-color: #b9cffc;
    }

.btn-marketplace {
    border-color: #ffe2bf;
    color: #b66700;
    background: #fff8ef;
}

    .btn-marketplace:hover {
        background: #fff2df;
        border-color: #ffd29b;
    }

.map-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000; /* removeu align-items, justify-content e padding */
    pointer-events: none;
}

    .map-modal.is-open {
        display: block; /* era flex — agora block para o JS posicionar */
        pointer-events: all;
    }

.map-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(3px);
}

.map-modal-dialog {
    position: absolute; /* era relative — agora absolute para o JS controlar top/left */
    width: min(600px, calc(100vw - 32px)); /* menor que 960px para caber perto do botão */
    background: var(--white);
    border: 1px solid rgba(206, 224, 208, 0.9);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.map-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e9efe9;
    background: linear-gradient(180deg, #ffffff 0%, #f8fcf8 100%);
}

.map-modal-kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-light);
    margin-bottom: 6px;
}

.map-modal-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    line-height: 1.3;
}

.map-modal-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .map-modal-close:hover {
        transform: translateY(-1px);
        border-color: var(--green-light);
        box-shadow: var(--shadow-sm);
    }

#mapFrame {
    display: block;
    width: 100%;
    height: min(70vh, 560px);
    border: 0;
}

@media (max-width: 640px) {
    .map-modal {
        padding: 12px;
    }

    .map-modal-dialog {
        border-radius: 18px;
    }

    #mapFrame {
        height: 60vh;
    }
}



.dist-priority {
    background: #eaf6dc;
    color: #65ac1e;
    border: 1px solid #cfe8b3;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    display: inline-block;
}


.priority-ribbon {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg,#65ac1e,#7ccf2a);
    color: white;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    padding: 6px 14px;
    border-radius: 12px 12px 0 0;
}




.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(245,249,244,.75);
    backdrop-filter: blur(2px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-box {
    background: #fff;
    padding: 26px 32px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 220px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 4px solid #dcead6;
    border-top-color: #65ac1e;
    animation: spin .8s linear infinite;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: #355b35;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}





/* ===== FIELDS ===== */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    animation: fadeUp .4s ease both;
}

    .field:nth-child(1) {
        animation-delay: .05s;
    }

    .field:nth-child(2) {
        animation-delay: .10s;
    }

    .field:nth-child(3) {
        animation-delay: .15s;
    }

    .field:nth-child(4) {
        animation-delay: .20s;
    }

    .field:nth-child(5) {
        animation-delay: .25s;
    }

label {
    font-family: 'DM Sans', sans-serif;
    font-size: .84rem;
    font-weight: 500;
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

input::placeholder {
    color: #b0c8b2;
}

input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(90,168,88,.15);
}

.select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .select-wrap select {
        width: 100%;
        appearance: none;
        background: #fff;
        border: 1.5px solid var(--border);
        border-radius: var(--radius-sm);
        padding: 10px 36px 10px 13px;
        font-family: 'DM Sans', sans-serif;
        font-size: .9rem;
        color: var(--text);
        cursor: pointer;
        outline: none;
        transition: border-color .2s, box-shadow .2s;
    }

        .select-wrap select:focus {
            border-color: var(--green);
            box-shadow: 0 0 0 3px rgba(90,168,88,.15);
        }

.chevron {
    position: absolute;
    right: 12px;
    font-size: 1.1rem;
    color: var(--green);
    pointer-events: none;
    line-height: 1;
}

/* ===== CHECKBOXES ===== */
.checks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

    .check-row input[type="checkbox"] {
        display: none;
    }

.check-box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
}

.check-row input:checked ~ .check-box {
    background: var(--green);
    border-color: var(--green);
}

    .check-row input:checked ~ .check-box::after {
        content: '';
        width: 4px;
        height: 8px;
        border: 2px solid #fff;
        border-top: none;
        border-left: none;
        transform: rotate(45deg) translateY(-1px);
        display: block;
    }

.check-label {
    font-size: .83rem;
    color: var(--text);
    line-height: 1.5;
    font-weight: 400;
}

    .check-label a {
        color: var(--green-light);
        font-weight: 500;
        text-decoration: none;
    }

        .check-label a:hover {
            text-decoration: underline;
        }

/* ===== SUBMIT ===== */
.form-footer {
    display: flex;
    justify-content: center;
}

.btn-next {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 40px;
    font-family: 'Syne', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(58,125,68,.28);
    transition: background .2s, transform .15s, box-shadow .2s;
}

    .btn-next:hover {
        background: var(--green-light);
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(58,125,68,.32);
    }

    .btn-next:active {
        transform: translateY(0);
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .form-card {
        padding: 20px 16px 20px;
    }

    .container {
        padding-top: 24px;
    }

    .step-label {
        display: none;
    }

    .step-line {
        width: 28px;
    }
}



/* ===== ALERTA FORM ===== */
.alerta-wrapper {
    animation: fadeUp .3s ease both;
}

.alerta-login {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.5;
    border-left: 3px solid;
    /* padrão: erro (vermelho) — sobrescreva via code-behind se quiser sucesso */
    background: #fff4f4;
    border-color: #e05252;
    color: #b92f2f;
}

/* Variação de sucesso: adicione CssClass="alerta-login alerta-sucesso" no code-behind */
.alerta-sucesso {
    background: var(--green-pale);
    border-color: var(--green-light);
    color: var(--green);
}

/* Variação de aviso */
.alerta-aviso {
    background: #fffbea;
    border-color: var(--accent);
    color: #8a6000;
}


.step-line {
    width: 60px;
    height: 2px;
    background: var(--green); /* sempre verde, tirando a dependência da classe done */
    margin: 0 8px;
    border-radius: 2px;
}

.step-label {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .04em;
}