.bravo-map-wrapper {
    position: relative;
    font-family: Arial, sans-serif;
}

.bravo-map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bravo-map-controls input,
.bravo-map-controls button {
    padding: 6px 8px;
    font-size: 14px;
}

/* Places Autocomplete styling */
.pac-container {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 4px;
    font-family: Arial, sans-serif;
}

.pac-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-item:last-child {
    border-bottom: none;
}

.pac-item-query {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.pac-matched {
    font-weight: 700;
    color: #007cba;
}

.pac-item-query .pac-matched {
    background-color: #e3f2fd;
    padding: 1px 3px;
    border-radius: 3px;
}



/* Category dropdown */
.bravo-map-category-dropdown {
    position: relative;
    display: inline-block;
}

.bravo-map-category-toggle {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 150px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.bravo-map-category-toggle:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0,124,186,0.1);
}

.bravo-map-category-toggle:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0,124,186,0.2);
}

.dropdown-arrow {
    font-size: 10px;
    color: #666;
    transition: transform 0.2s ease;
}

.bravo-map-category-toggle.open .dropdown-arrow {
    transform: rotate(180deg);
}

.bravo-map-category-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.bravo-map-category-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.bravo-map-category-option:last-child {
    border-bottom: none;
}

.bravo-map-category-option:hover {
    background-color: #f8f9fa;
}

.bravo-map-category-checkbox {
    margin-right: 8px;
    accent-color: #007cba;
}

.checkbox-label {
    font-size: 14px;
    color: #333;
    user-select: none;
}

/* Clean Layout with Proper Spacing */
.bravo-map-locations-container {
    margin-top: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.bravo-map-locations-container h3 {
    margin: 0;
    padding: 25px 30px;
    background: #f8f9fa;
    color: black;
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.bravo-map-locations-grid {
    display: block;
}

.bravo-map-location-card {
    margin: 0;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.bravo-map-location-card:last-child {
    border-bottom: none;
}

.bravo-map-location-card .card-header {
    margin-bottom: 15px;
}

.bravo-map-location-card .company-name {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.bravo-map-location-card .categories {
    margin: 8px 0;
}

.bravo-map-category-toggle .bravo_map_category_text {
    color: black !important;
}

.bravo-map-category-toggle {
    color: black !important;
}

.bravo-map-location-card .category-tag {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 4px;
    padding: 2px 8px;
    font-size: 0.85em;
    background: var(--global-palette2);
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.bravo-map-location-card .card-body {
    display: block;
}

.bravo-map-location-card .contact-info {
    margin-bottom: 15px;
}

.bravo-map-location-card .contact-person {
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
}

.bravo-map-location-card .address {
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #6b7280;
}

.bravo-map-location-card .contact-details {
    margin: 0;
}

.bravo-map-location-card .contact-item {
    margin-bottom: 6px;
    font-size: 0.9em;
}

.bravo-map-location-card .contact-icon {
    margin-right: 8px;
    color: #6b7280;
}

.bravo-map-location-card .contact-item a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.bravo-map-location-card .contact-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bravo-map-location-card .card-footer {
    margin-top: 15px;
}

.bravo-map-card-btn {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.bravo-map-card-btn:hover {
    background: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bravo-map-controls {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        margin-bottom: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .bravo-map-controls input[type="text"] {
        width: 100%;
        min-width: 100%;
    }
    
    .bravo-map-locations-container h3 {
        font-size: 1.3em;
        padding: 20px;
    }
    
    .bravo-map-location-card {
        padding: 20px;
    }
    
    .bravo-map-location-card .company-name {
        font-size: 1.2em;
    }
    
    .bravo-map-location-card .card-footer {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .bravo-map-locations-container h3 {
        font-size: 1.2em;
        padding: 15px;
    }
    
    .bravo-map-location-card {
        padding: 15px;
    }
    
    .bravo-map-location-card .company-name {
        font-size: 1.1em;
    }
}

/* Kadence Theme Compatibility */
.kadence-theme .bravo-map-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
}

.kadence-theme .bravo-map-controls {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.kadence-theme .bravo-map-locations-container {
    background: var(--global-palette9, #f9f9f9);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.kadence-theme .bravo-map-location-card {
    border-radius: 12px;
    overflow: hidden;
}

.kadence-theme .bravo-map-card-btn {
    background: var(--global-palette1, #007cba);
    transition: all 0.3s ease;
}

.kadence-theme .bravo-map-card-btn:hover {
    background: var(--global-palette2, #005a87);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.3);
}

/* WordPress 6.4+ Compatibility */
.wp-block-bravo-map-map-block {
    margin: 0;
}

.wp-block-bravo-map-map-block .bravo-map-wrapper {
    width: 100%;
}


/* Fix potential theme conflicts */
.bravo-map-wrapper * {
    box-sizing: border-box;
}

.bravo-map-wrapper input,
.bravo-map-wrapper select,
.bravo-map-wrapper button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* InfoWindow styling */
.bravo-map-infowindow {
    font-family: Arial, sans-serif;
    max-width: 320px;
    line-height: 1.4;
    background: #fff;
}

.bravo-map-infowindow .infowindow-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.bravo-map-infowindow .infowindow-title {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 700;
    color: #2c3e50;
}

.bravo-map-infowindow .infowindow-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bravo-map-infowindow .infowindow-category-tag {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.8em;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    color: #6c757d;
    font-weight: 500;
}

.bravo-map-infowindow .infowindow-body {
    margin: 0;
}

.bravo-map-infowindow .infowindow-contact-info {
    margin-bottom: 12px;
}

.bravo-map-infowindow .infowindow-contact-person {
    font-weight: 600;
    margin-bottom: 4px;
    color: #374151;
    font-size: 1em;
}

.bravo-map-infowindow .infowindow-address {
    color: #6b7280;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.bravo-map-infowindow .infowindow-contact-details {
    margin: 0;
}

.bravo-map-infowindow .infowindow-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.bravo-map-infowindow .infowindow-icon {
    margin-right: 6px;
    font-size: 0.9em;
    color: #6b7280;
    width: 16px;
    text-align: center;
}

.bravo-map-infowindow .infowindow-contact-item a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.bravo-map-infowindow .infowindow-contact-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}