/* ============================================================
   REPRESENTANTES — CSS isolado
   Prefixo .rep- em todas as classes para evitar colisões
   ============================================================ */

/* ── Ícone no menu ── */
.rep-nav-btn {
    background: transparent;
    border: 2px solid #ffffff; /* Default white border for transparent hero */
    cursor: pointer;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff; /* Default white text */
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    margin-top: -1px;
}

/* When header is scrolled (white background), border and text become red */
header.scrolled .rep-nav-btn {
    color: #ED3237;
    border-color: #ED3237;
}

.rep-nav-btn:hover,
.rep-nav-btn:focus-visible {
    background-color: #ED3237;
    border-color: #ED3237;
    color: #ffffff !important;
    outline: none;
}

.rep-nav-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

/* Tooltip removed since text is now inside the button */

/* ── Overlay / Modal ── */
.rep-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rep-overlay.rep-open {
    opacity: 1;
    visibility: visible;
}

.rep-modal {
    background: #1a1a1a;
    border: 1px solid #2e2e2e;
    border-radius: 6px;
    width: 100%;
    max-width: 960px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.rep-overlay.rep-open .rep-modal {
    transform: translateY(0);
}

/* Fechar */
.rep-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #8a8a8a;
    cursor: pointer;
    font-size: 1.6rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 3px;
    transition: color 0.2s ease, background 0.2s ease;
}

.rep-close:hover,
.rep-close:focus-visible {
    color: #ffffff;
    background: #2e2e2e;
    outline: none;
}

/* Cabeçalho do modal */
.rep-modal-header {
    margin-bottom: 0.25rem;
}

.rep-modal-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.4rem;
}

.rep-modal-header h2 span {
    color: #ED3237;
}

.rep-modal-header p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #8a8a8a;
    margin: 0;
}

/* ── Layout: mapa + card ── */
.rep-body {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-top: 1rem;
}

/* ── Mapa SVG ── */
.rep-mapa-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

#rep-mapa-brasil {
    width: 100%;
    height: auto;
    display: block;
}

/* Estados sem representante */
#rep-mapa-brasil path {
    fill: #2e2e2e;
    stroke: #111111;
    stroke-width: 0.8;
    cursor: default;
    transition: fill 0.2s ease;
}

/* Estados com representante */
#rep-mapa-brasil path.rep-ativo {
    fill: #ED3237;
    cursor: pointer;
}

#rep-mapa-brasil path.rep-ativo:hover {
    fill: #ff5a56;
}

#rep-mapa-brasil path.rep-selecionado {
    fill: #c22a2e;
    stroke: #ffffff;
    stroke-width: 1.5;
}

/* ── Card do representante ── */
.rep-card {
    flex: 0 0 260px;
    background: #111111;
    border: 1px solid #2e2e2e;
    border-left: 4px solid #ED3237;
    border-radius: 4px;
    padding: 1.5rem;
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.rep-card.rep-card-visible {
    display: flex;
}

.rep-card-estado {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin: 0 0 0.25rem;
}

.rep-card-nome {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #ED3237;
    margin: 0;
}

.rep-card-obs {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #8a8a8a;
    margin: 0;
}

.rep-card-contatos {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rep-contato-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    color: #cccccc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rep-contato-item:hover {
    color: #ffffff;
}

.rep-contato-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: #Ed3237;
}

.rep-contato-vazio {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #555555;
    font-style: italic;
}

/* Placeholder — nenhum estado selecionado */
.rep-card-placeholder {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #111111;
    border: 1px dashed #2e2e2e;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    color: #444444;
}

.rep-card-placeholder svg {
    width: 36px;
    height: 36px;
    fill: #2e2e2e;
}

.rep-card-placeholder p {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    margin: 0;
    line-height: 1.5;
}

/* ── Responsivo ── */
@media (max-width: 768px) {
    .rep-modal {
        padding: 1.5rem 1rem 1rem;
        max-height: 98vh;
        width: 95vw;
        border-radius: 8px;
    }

    .rep-modal-header h2 {
        font-size: 1.5rem;
    }

    .rep-modal-header p {
        font-size: 0.8rem;
    }

    .rep-body {
        flex-direction: column;
        gap: 1.5rem;
    }

    .rep-mapa-wrapper {
        padding: 0;
        max-height: 40vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #rep-mapa-brasil {
        width: 100%;
        height: auto;
        max-height: 100%;
    }

    .rep-card,
    .rep-card-placeholder {
        flex: 1 0 auto;
        width: 100%;
        padding: 1.2rem;
        border-left: none;
        border-top: 4px solid #ED3237;
    }

    .rep-card-estado {
        font-size: 1.1rem;
    }
}

/* ── Botão Whatsapp no Card ── */
.rep-btn-wpp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-top: 15px;
    transition: all 0.3s ease;
    width: 100%;
}

@media (max-width: 768px) {
    .rep-btn-wpp {
        font-size: 0.95rem;
    }
}

.rep-btn-wpp:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    color: #ffffff;
}

.rep-btn-wpp svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ── Scrollbar dentro do modal ── */
.rep-modal::-webkit-scrollbar {
    width: 6px;
}
.rep-modal::-webkit-scrollbar-track {
    background: #111111;
}
.rep-modal::-webkit-scrollbar-thumb {
    background: #2e2e2e;
    border-radius: 3px;
}
