/* ==============================
   MAP CONTAINER
============================== */
#svg-map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: auto;
    overflow: hidden;
    margin: 0 auto;
}

/* Ensure the embedded SVG scales responsively */
#svg-map-container svg {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto;
}

/* ==============================
   POPUP / TOOLTIP BOX - NOW CLICKABLE (pointer-events: auto)
============================== */
#city-popup {
    position: fixed;
    top: 0;
    left: 0;
    background-color: #ffffff;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    
    /* FIX: ALLOW INTERACTION when visible */
    pointer-events: auto; 
    opacity: 0;
    display: none; /* Ensure it starts hidden */
    
    transition: opacity 0.18s, transform 0.18s;
    min-width: 280px;
    max-width: 460px;
    box-sizing: border-box;
    /* FONT: Neu Haas Grotesk */
    font-family: 'Neue Haas Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
}

/* ==============================
   CARD HEADER
============================== */
.scp-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: #2d2d2d;
    margin-bottom: 10px;
}

/* Location pin icon - COLOR UPDATED TO #BE0A3F */
.scp-pin {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #BE0A3F;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scp-pin .scp-has-svg {
    width: 14px;
    height: 14px;
    fill: #ffffff !important;
}

/* ==============================
   INDUSTRY PILLS CONTAINER - FIX: JUSTIFY LEFT
============================== */
.scp-list {
    display: flex;
    flex-wrap: wrap !important;
    gap: 8px;
    /* FIX: Anchor items to the left to prevent stretching */
    justify-content: flex-start;
    align-items: flex-start;
    margin-left: 0;
}

/* ==============================
   INDUSTRY PILL ITEMS - 2-COLUMN FLEX LAYOUT
============================== */
.scp-item {
    /* Force 50% width on items to create 2 columns */
    flex: 0 0 calc(50% - 4px) !important; 
    
    display: flex;
    align-items: center;
    justify-content: center;

    background: #37354C;
    color: #ffffff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    
    /* FONT: Neu Haas Grotesk */
    font-family: 'Neue Haas Grotesk', 'Helvetica Neue', Helvetica, sans-serif;
    
    /* Allow services to span two lines without truncation */
    white-space: normal; 
    overflow: visible; 
    text-overflow: unset; 
    word-break: break-word;
    text-decoration: none; /* Crucial when using <a> tag */

    box-sizing: border-box;
    min-height: 48px;
    text-align: center;
}

.scp-item:hover,
.scp-item:focus {
    color: #ffffff !important; /* Override theme hover colour */
    background: #BE0A3F;
}

/* Text inside pill */
.scp-item-pill {
    /* Allow up to two lines while keeping alignment consistent */
    display: grid;
    place-items: center;
    width: 100%;
    text-align: center;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    min-height: 2.6em; /* Reserve space for two lines */
}

/* ==============================
   RESPONSIVE DESIGN
============================== */

/* Mobile styles (max-width: 768px) */
@media (max-width: 768px) {
    #city-popup {
        padding: 14px 16px;
        min-width: 240px;
        font-size: 15px;
    }

    .scp-card-header {
        font-size: 16px;
        gap: 6px;
    }

    .scp-pin {
        width: 24px;
        height: 24px;
    }

    .scp-item {
        /* 2-column on tablets, with smaller padding/font */
        flex: 0 0 calc(50% - 4px) !important;
        padding: 6px 8px;
        font-size: 13px;
        /* Allow text to wrap consistently */
        white-space: normal; 
        overflow: visible; 
        text-overflow: unset; 
    }
    
    .scp-item-pill {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
}

/* Small phone styles (max-width: 480px) */
@media (max-width: 480px) {
    #city-popup {
        min-width: 200px;
        padding: 12px 14px;
    }

    .scp-card-header {
        font-size: 15px;
    }
    
    /* Enforce 1-column layout on very small screens */
    .scp-item {
        flex: 1 1 100% !important;
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* ==============================
   DESKTOP TWEAKS
============================== */
@media (min-width: 769px) {
    .scp-item,
    .scp-item-pill {
        white-space: normal;
    }
}
