/**
 * Noov'Hub Team Map - Styles
 */

:root {
    --nhtm-primary: #DC2626;
    --nhtm-primary-hover: #B91C1C;
    --nhtm-bg: #F8FAFC;
    --nhtm-panel: #FFFFFF;
    --nhtm-border: #E5E7EB;
    --nhtm-text: #0F172A;
    --nhtm-text-secondary: #64748B;
    --nhtm-white: #FFFFFF;
    --nhtm-radius: 14px;
    --nhtm-glow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

/* Container */
.nhtm-team-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    animation: fadeIn 0.3s ease-in;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(220, 38, 38, 0.08), transparent 25%),
        radial-gradient(ellipse at 80% 0%, rgba(12, 74, 110, 0.06), transparent 30%),
        var(--nhtm-bg);
    border-radius: 18px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero */
.nhtm-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 22px 12px;
    border-radius: var(--nhtm-radius);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(148, 163, 184, 0.08));
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--nhtm-glow);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nhtm-hero-text {
    flex: 1;
    min-width: 280px;
}

.nhtm-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--nhtm-primary);
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
}

.nhtm-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--nhtm-text);
    margin: 10px 0 6px 0;
}

.nhtm-subtitle {
    font-size: 15px;
    color: var(--nhtm-text-secondary);
    margin: 0 0 12px 0;
}

.nhtm-hero-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nhtm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.nhtm-badge-live {
    background: #E6F4EA;
    color: #15803D;
    border: 1px solid #C2E3CD;
}

.nhtm-badge-soft {
    background: #EEF2FF;
    color: #4338CA;
    border: 1px solid #C7D2FE;
}

.nhtm-hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    min-width: 320px;
}

.nhtm-stat-card {
    background: var(--nhtm-panel);
    border: 1px solid var(--nhtm-border);
    border-radius: var(--nhtm-radius);
    padding: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
}

.nhtm-stat-label {
    margin: 0 0 6px 0;
    color: var(--nhtm-text-secondary);
    font-size: 12px;
    letter-spacing: 0.01em;
}

.nhtm-stat-value {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--nhtm-text);
}

/* Controls */
.nhtm-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

/* Search */
.nhtm-search-box {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.nhtm-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nhtm-text-secondary);
}

.nhtm-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--nhtm-border);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--nhtm-panel);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nhtm-search-input:focus {
    outline: none;
    border-color: var(--nhtm-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Toggle */
.nhtm-view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(15, 23, 42, 0.04);
    padding: 4px;
    border-radius: 10px;
}

.nhtm-toggle-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--nhtm-text-secondary);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.nhtm-toggle-btn:hover {
    color: var(--nhtm-text);
}

.nhtm-toggle-btn.active {
    background: var(--nhtm-white);
    color: var(--nhtm-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Views */
.nhtm-view {
    display: none;
    transition: opacity 0.2s ease;
}

.nhtm-view.active {
    display: block;
    opacity: 1;
}

/* Map Container */
.nhtm-map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--nhtm-glow);
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.92));
}

.nhtm-map {
    width: 100%;
    height: 560px;
}

/* Map Markers */
.agent-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nhtm-primary);
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    transition: transform 0.2s;
}

.agent-marker:hover {
    transform: scale(1.1);
}

.agent-marker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Google Maps InfoWindow Popup */
.gm-style .gm-style-iw-c {
    padding: 12px !important;
    border-radius: 8px !important;
    min-width: 240px !important;
    max-width: 300px !important;
}

.gm-style .gm-style-iw-d {
    overflow: auto !important;
    max-height: none !important;
}

.gm-style .gm-style-iw-t::after {
    background: white !important;
}

.nhtm-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.nhtm-popup-close {
    background: none;
    border: none;
    color: var(--nhtm-text-secondary);
    cursor: pointer;
    padding: 0;
    display: flex;
}

.nhtm-popup-close:hover {
    color: var(--nhtm-text);
}

.nhtm-popup-name {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px 0;
    color: var(--nhtm-text);
}

.nhtm-popup-city {
    font-size: 12px;
    color: var(--nhtm-text-secondary);
    margin: 0;
}

.nhtm-popup-info {
    display: grid;
    gap: 4px;
    font-size: 12px;
    margin-bottom: 8px;
}

.nhtm-popup-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nhtm-popup-info-item svg {
    color: var(--nhtm-text-secondary);
    flex-shrink: 0;
}

.nhtm-popup-info-item a {
    color: var(--nhtm-text);
    text-decoration: none;
}

.nhtm-popup-info-item a:hover {
    color: var(--nhtm-primary);
}

/* Member Grid */
.nhtm-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Member Card */
.nhtm-member-card {
    background: var(--nhtm-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--nhtm-border);
    transition: all 0.2s;
}

.nhtm-member-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nhtm-member-photo {
    position: relative;
    aspect-ratio: 4/3;
    background: var(--nhtm-bg);
    overflow: hidden;
}

.nhtm-member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nhtm-member-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    padding: 12px;
}

.nhtm-member-name {
    font-weight: 600;
    margin: 0 0 4px 0;
    font-size: 16px;
}

.nhtm-member-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin: 0;
}

.nhtm-member-location svg {
    flex-shrink: 0;
}

.nhtm-member-info {
    padding: 12px;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.nhtm-member-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nhtm-member-info-item svg {
    color: var(--nhtm-text-secondary);
    flex-shrink: 0;
}

.nhtm-member-info-item a {
    color: var(--nhtm-text);
    text-decoration: none;
}

.nhtm-member-info-item a:hover {
    color: var(--nhtm-primary);
}

.nhtm-member-footer {
    padding: 12px;
    padding-top: 0;
}

/* Buttons */
.nhtm-btn,
.nhtm-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
}

.nhtm-btn {
    background: var(--nhtm-primary);
    color: white;
}

.nhtm-btn:hover {
    background: var(--nhtm-primary-hover);
}

.nhtm-btn-outline {
    background: transparent;
    border: 1px solid var(--nhtm-border);
    color: var(--nhtm-text);
}

.nhtm-btn-outline:hover {
    background: var(--nhtm-bg);
    border-color: var(--nhtm-primary);
}

.nhtm-btn-full {
    width: 100%;
}

/* Loading */
.nhtm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--nhtm-text-secondary);
}

.nhtm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--nhtm-border);
    border-top-color: var(--nhtm-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

/* No Results */
.nhtm-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--nhtm-text-secondary);
}

.nhtm-no-results svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.nhtm-no-results p {
    margin: 0 0 16px 0;
    font-size: 16px;
}

/* Notice */
.nhtm-notice {
    padding: 16px;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 8px;
    color: #92400E;
}

/* Responsive */
@media (max-width: 768px) {
    .nhtm-hero {
        flex-direction: column;
    }

    .nhtm-hero-stats {
        width: 100%;
    }

    .nhtm-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .nhtm-search-box {
        max-width: none;
    }

    .nhtm-view-toggle {
        width: 100%;
    }

    .nhtm-toggle-btn {
        flex: 1;
    }

    .nhtm-member-grid {
        grid-template-columns: 1fr;
    }

    .nhtm-map {
        height: 420px;
    }
}
