.glm-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #050505;
    gap: 0;
    overflow: hidden;
}

.glm-content-row {
    display: flex;
    width: 100%;
    max-height: 620px;
    background: #ffffff;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
}

.glm-map-area {
    flex: 0 0 50%;
    min-width: 0;
    background: #e9eef3;
}

#glm-map {
    width: 100%;
    height: 720px;
    display: block;
    overflow: hidden;
    cursor: default;
    touch-action: none;
}

#glm-map .leaflet-grab,
#glm-map .leaflet-dragging .leaflet-grab,
#glm-map .leaflet-container {
    cursor: default !important;
}

.glm-sidebar {
    flex: 0 0 50%;
    background: #050505;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 340px;
    box-sizing: border-box;
}

.glm-search {
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 16px;
    margin-bottom: 0;
    border: 1px solid #d9d9d9;
    border-radius: 3px;
    background: #ffffff;
    color: #333333;
    font-size: 15px;
    line-height: 52px;
    box-sizing: border-box;
    outline: none;
}

.glm-search:focus {
    border-color: #333;
    box-shadow: 0 0 0 1px #333;
}

/* Filters */
.glm-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr) 76px;
    gap: 8px;
    margin-bottom: 18px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.glm-industry-filter-wrap,
.glm-country-filter-wrap,
.glm-state-filter-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.glm-filters select#glm-region,
.glm-filters select#glm-type,
.glm-clear-filters {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.glm-filter-toggle,
.glm-filters select,
.glm-clear-filters {
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 0 28px 0 12px;
    border-radius: 3px;
    border: none;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 52px;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glm-filter-toggle {
    background: #ffffff;
    color: #222222;
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.glm-filter-toggle span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#glm-industry-label,
#glm-country-label,
#glm-state-label {
    position: absolute;
    left: 12px;
    right: 30px;
    top: 0;
    height: 52px;
    line-height: 52px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
    z-index: 1;
}

.glm-filter-toggle.active-filter {
    background:#fff;
    color: #333;
}

.glm-filter-toggle.glm-disabled {
    background: #666666;
    color: #222222;
    cursor: not-allowed;
}

.glm-filters select {
    background: #ffffff;
    color: #222222;
    cursor: pointer;
    border: 1px solid #e3e3e3;
    font-weight: 500;
}

.glm-clear-filters {
    background: #ffffff;
    color: #ff0000;
    cursor: pointer;
    border: 1px solid #ffffff;
    font-weight: 500;
    padding: 0 6px;
    text-align: center;
}

.glm-clear-filters:hover {
    background: #f5f5f5;
    color: #ff0000;
}

.glm-container button:focus,
.glm-container button:hover,
.glm-container [type="button"]:focus,
.glm-container [type="button"]:hover,
.glm-container [type="submit"]:focus,
.glm-container [type="submit"]:hover {
    text-decoration: none;
    background: #ffffff !important;
    color: #333 !important;
}

/* ================================
   Same dropdown arrow for all filters
   Works for:
   - Custom filter buttons
   - Native select dropdowns
================================ */

/* Custom dropdown buttons */
.glm-filter-toggle {
    position: relative !important;
    padding-right: 42px !important;
}

.glm-filter-toggle::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    width: 12px !important;
    height: 8px !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    z-index: 5 !important;

    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 12px 8px !important;
}

/* Disabled custom dropdown */
.glm-filter-toggle.glm-disabled::after {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
}

/* Native select dropdowns */
.glm-container .filter-section select,
.glm-filters select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;

    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;

    padding-right: 42px !important;
}

/* Disabled native select */
.glm-container .filter-section select:disabled,
.glm-filters select:disabled {
    opacity: 1 !important;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 12px 8px !important;
}

/* Remove old/default browser select arrow */
.glm-container .filter-section select::-ms-expand,
.glm-filters select::-ms-expand {
    display: none !important;
}

/* Dropdown menus */
.glm-industry-menu,
.glm-country-menu,
.glm-state-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    max-height: 280px;
    overflow-y: auto;
    z-index: 9999;
    padding: 6px 0;
    box-sizing: border-box;
    display: none;
}

.glm-industry-menu.open,
.glm-country-menu.open,
.glm-state-menu.open {
    display: block;
}

.glm-industry-option,
.glm-country-option,
.glm-state-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    color: #222222;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.glm-industry-option:hover,
.glm-country-option:hover,
.glm-state-option:hover {
    background: #f5f5f5;
}

.glm-industry-option input[type="checkbox"],
.glm-country-option input[type="checkbox"],
.glm-state-option input[type="checkbox"] {
    margin: 3px 0 0 0;
    flex: 0 0 auto;
}

.glm-industry-option span,
.glm-country-option span,
.glm-state-option span {
    flex: 1;
    display: block;
    word-break: break-word;
}

/* Cards */
.glm-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: start;
}

.glm-card {
    background: #101010;
    padding: 16px 16px 18px;
    border-left: 4px solid #00c8e8;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    min-height: 120px;
    box-sizing: border-box;
    overflow: hidden;
}

.glm-card:hover {
    background: #171717;
    transform: translateY(-1px);
}

.glm-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #ffffff;
}

.glm-card-title {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.glm-card-title-text {
    display: inline;
}

.glm-card-type-labels {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    position: relative;
    top: -2px;
}

.glm-card-type-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border: 1px solid #ffffff;
    border-radius: 5px;
    background: transparent;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
}

.glm-type-distributor,
.glm-type-sales-representative,
.glm-type-derrick-office,
.glm-type-corporate-office,
.glm-type-default {
    background: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.glm-card p {
    margin: 0 0 5px 0;
    font-size: 12px;
    line-height: 1.55;
    color: #ffffff;
    word-break: break-word;
}

.glm-card p:last-child {
    margin-bottom: 0;
}

.glm-card a {
    color: #ffffff;
}

/* Card badges */
.glm-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 8px 0;
}

.glm-card-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;
    color: #ffffff;
    word-break: break-word;
}

.glm-badge-industry {
    background: #007935;
}

.glm-badge-industry-oil-gas {
    background: #007935;
}

.glm-badge-industry-mining-industrial {
    background: #007935;
}

.glm-badge-industry-underground-construction {
    background: #007935;
}

.glm-badge-industry-default {
    background: #007935;
}

.glm-badge-type {
    background: #d5ffd4;
    color: #061014;
}
button#glm-industry-toggle:hover, button#glm-industry-toggle:focus {
    background: #ffffff !important;
    color: #333 !important;
}
.filter-section {
    width: 100%;
    background: #050505;
    position: relative;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: flex-start;
    overflow: visible;
}

.filter-section .glm-search {
    flex: 0 0 calc(40% - 4px);
    width: calc(40% - 4px);
    max-width: calc(40% - 4px);
    margin: 0;
}

.filter-section .glm-filters {
    flex: 0 0 calc(60% - 4px);
    width: calc(60% - 4px);
    max-width: calc(60% - 4px);
    margin: 0;
    align-self: flex-start;
    position: relative;
    z-index: 10000;
}

.filter-section .glm-industry-menu,
.filter-section .glm-country-menu,
.filter-section .glm-state-menu {
    z-index: 10001;
}

.glm-content-row,
.glm-map-area,
#glm-map {
    position: relative;
    z-index: 0;
}
/* Laptop / 14-inch fix */
@media (min-width: 1201px) and (max-width: 1600px) {
    .glm-filters {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1fr) 76px;
        gap: 8px;
    }

    .glm-filter-toggle,
    .glm-filters select,
    .glm-clear-filters {
        height: 52px;
        min-height: 52px;
        line-height: 52px;
        font-size: 14px;
        padding-left: 12px;
        padding-right: 28px;
    }

    #glm-industry-label,
    #glm-country-label,
    #glm-state-label {
        left: 12px;
        right: 30px;
        height: 52px;
        line-height: 52px;
    }

    .glm-clear-filters {
        padding-left: 6px;
        padding-right: 6px;
        text-align: center;
    }
}

/* Tablet */
@media (max-width: 1200px) {
    .glm-content-row {
        flex-direction: column;
        max-height: none;
        min-height: 0;
    }

    .glm-map-area,
    .glm-sidebar {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    #glm-map {
        height: 300px;
    }

    .glm-sidebar {
        max-height: none;
    }

    .glm-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .glm-clear-filters {
        text-align: center;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .filter-section,
    .glm-sidebar {
        padding: 16px;
    }

    .filter-section {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .filter-section .glm-search,
    .filter-section .glm-filters {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }

    .glm-filters {
        grid-template-columns: 1fr;
    }

    .glm-industry-filter-wrap,
    .glm-country-filter-wrap,
    .glm-state-filter-wrap,
    .glm-filters select#glm-region,
    .glm-filters select#glm-type,
    .glm-clear-filters {
        width: 100%;
    }

    .glm-list {
        grid-template-columns: 1fr;
    }

    #glm-map {
        height: 200px;
    }
}


/* Green map marker for Distributor and Sales Representative offices */
.glm-green-marker-icon {
    background: transparent;
    border: none;
}

.glm-map-pin {
    display: block;
    width: 16px;
    height: 17px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.32);
    position: relative;
}

.glm-map-pin::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #ffffff;
}

.glm-map-pin-green {
    background: #0a9d1d;
    border: 2px solid #057015;
}

.glm-card-region {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    color: #cfcfcf !important;
}
/* Country hover tooltip */
.glm-country-tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #222222;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 7px;
    pointer-events: none;
}

.glm-country-tooltip::before {
    border-top-color: rgba(255, 255, 255, 0.95);
}
/* Remove browser focus box from country boundary paths */
#glm-map .leaflet-interactive:focus,
#glm-map .leaflet-interactive:focus-visible,
#glm-map svg path.leaflet-interactive:focus,
#glm-map svg path.leaflet-interactive:focus-visible {
    outline: none !important;
}

#glm-map svg path.leaflet-interactive {
    outline: none !important;
}
/* Temporary: hide map and make address cards full width */
.glm-map-area,
#glm-map {
    display: none !important;
}

.glm-content-row {
    display: block !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    background: #050505 !important;
}

.glm-sidebar {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.glm-list {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 1200px) {
    .glm-list {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .glm-list {
        grid-template-columns: 1fr !important;
    }
}

/* Cards/results fixed height with inner scroll */
.glm-sidebar {
    max-height: 80vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.glm-content-row {
    overflow: visible !important;
}
