/* 
    REPRESENTANTES - STYLE SYSTEM
    Prefix: .rep-
    Modular CSS for Brazil Interactive Map
*/

:root {
    --rep-primary: #1A4FD6;
    --rep-primary-hover: #143DA3;
    --rep-bg-overlay: rgba(10, 22, 40, 0.95);
    --rep-modal-bg: #0D1B3E;
    --rep-card-bg: #111827;
    --rep-text-white: #FFFFFF;
    --rep-text-gray: #E2E8F0;
    --rep-text-muted: #6B7280;
    --rep-accent: #25D366; /* WhatsApp Green */
    --rep-border: rgba(255, 255, 255, 0.1);
    --rep-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --rep-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Overlay */
.rep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--rep-bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--rep-transition);
    backdrop-filter: blur(8px);
    padding: 20px;
}

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

/* Modal Container */
.rep-modal {
    background: var(--rep-modal-bg);
    width: 100%;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: var(--rep-shadow);
    overflow: hidden;
    position: relative;
    transform: translateY(30px);
    transition: var(--rep-transition);
    border: 1px solid var(--rep-border);
}

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

/* Close Button */
.rep-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--rep-text-white);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: var(--rep-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.rep-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Modal Header */
.rep-modal-header {
    padding: 40px 40px 10px;
    text-align: left;
}

.rep-modal-header h2 {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 38px;
    color: var(--rep-text-white);
    margin: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
}

.rep-modal-header h2 span {
    color: var(--rep-primary);
}

.rep-modal-header p {
    color: var(--rep-text-muted);
    font-size: 15px;
    margin-top: 4px;
}

/* Modal Content Grid */
.rep-modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 0 40px 40px;
    align-items: center;
}

/* Map Section */
.rep-map-wrapper {
    position: relative;
    width: 100%;
}

.rep-map-svg {
    width: 100%;
    height: auto;
    max-height: 450px;
}

.rep-map-svg path {
    fill: #112240;
    stroke: #1a2a4a;
    stroke-width: 0.5;
    transition: var(--rep-transition);
}

.rep-map-svg path[data-active="true"] {
    fill: #143DA3;
    cursor: pointer;
}

.rep-map-svg path[data-active="true"]:hover {
    fill: var(--rep-primary);
    filter: drop-shadow(0 0 8px rgba(26, 79, 214, 0.4));
}

.rep-map-svg path.selected {
    fill: var(--rep-primary) !important;
}

/* Info Card Section */
.rep-info-card {
    background: var(--rep-card-bg);
    border: 1px solid var(--rep-border);
    border-radius: 12px;
    padding: 30px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    transition: var(--rep-transition);
    position: relative;
    overflow: hidden;
}

.rep-info-card::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 0;
    width: 4px;
    background: var(--rep-primary);
}

.rep-state-label {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: var(--rep-primary);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.rep-state-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    color: var(--rep-text-white);
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.rep-rep-name {
    font-size: 18px;
    color: var(--rep-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.rep-phone-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--rep-text-white);
    margin-bottom: 25px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--rep-transition);
}

.rep-phone-row:hover {
    opacity: 0.8;
}

.rep-phone-row svg {
    width: 18px;
    height: 18px;
    color: var(--rep-primary);
}

.rep-phone-number {
    font-size: 17px;
    font-weight: 500;
}

.rep-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--rep-text-muted);
}

.rep-placeholder i {
    font-size: 40px;
    opacity: 0.3;
}

/* WhatsApp Button */
.rep-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--rep-accent);
    color: #000;
    padding: 14px 24px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 13px;
    text-decoration: none;
    transition: var(--rep-transition);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
    width: fit-content;
    max-width: 100%;
}

.rep-whatsapp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    filter: brightness(1.1);
}

/* Navigation Button (Gatilho) */
.rep-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

header.scrolled .rep-nav-btn {
    color: var(--navy);
    border-color: rgba(0, 0, 0, 0.1);
}

.rep-nav-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .rep-modal {
        max-height: 90vh;
        overflow-y: auto;
    }

    .rep-modal-content {
        grid-template-columns: 1fr;
        padding: 0 20px 20px;
        gap: 20px;
    }

    .rep-modal-header {
        padding: 30px 20px 10px;
    }

    .rep-modal-header h2 {
        font-size: 24px;
    }

    .rep-info-card {
        padding: 30px 20px;
        min-height: 200px;
    }

    .rep-map-svg {
        max-height: 300px;
    }
}
