/**
 * TDI Google Maps Frontend Styles
 */
.tgm-google-maps-container {
    width: 100%;
    max-width: 100% !important;
    margin: 20px auto;
    box-sizing: border-box;
}

.tgm-map-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.tgm-controls-top {
    width: 100%;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px;
    background-color: #eee;
    box-sizing: border-box;
}

.tgm-controls-top .tgm-search-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.tgm-controls-top .tgm-search-input {
    flex: 1;
}

.tgm-range-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    height: 40px;
    box-sizing: border-box;
}

.tgm-range-select:hover {
    border-color: #0073aa;
}

.tgm-range-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.tgm-map-content-wrapper {
    display: flex;
    flex-direction: row;
    gap: 0px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.tgm-map {
    flex: 1;
    min-height: 400px;
    min-width: 0;
    border: 1px solid #ddd;
}

.tgm-marker-details.tgm-display-none {
    display: none;
}

.tgm-sidebar {
    width: 350px;
    height: 100vh;
    min-width: 0;
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    position: relative;
}

.tgm-search-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.tgm-search-input {
    width: max-content;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 40px;
    box-sizing: border-box;
}

.tgm-use-location-btn {
    padding: 8px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    box-sizing: border-box;
    transition: background 0.2s;
}

.tgm-use-location-btn svg {
    width: 20px;
    height: 20px;
}

.tgm-use-location-btn:hover {
    background: #005a87;
}

.tgm-use-location-btn:disabled,
.tgm-use-location-btn.tgm-loading {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.tgm-use-location-btn.tgm-loading svg {
    animation: tgm-spin 1s linear infinite;
}

@keyframes tgm-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.tgm-tag-filters {
    padding: 15px 15px 0 15px;
    border-bottom: 1px solid #eee;
}

.tgm-tag-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tgm-tag-filter {
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tgm-tag-filter:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.tgm-tag-filter.tgm-tag-filter-active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.tgm-tag-filter.tgm-tag-filter-active:hover {
    background: #005a87;
    border-color: #005a87;
}

.tgm-tag-filter.tgm-tag-filter-disabled,
.tgm-tag-filter:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    color: #999;
}

.tgm-tag-filter.tgm-tag-filter-disabled:hover,
.tgm-tag-filter:disabled:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.tgm-marker-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.tgm-marker-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tgm-marker-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.tgm-marker-item:hover {
    background: #f0f0f0;
}

.tgm-marker-item strong {
    margin-bottom: 5px;
    color: #333;
}

.tgm-company {
    color: #666;
    font-size: 14px;
}

.tgm-city {
    color: #999;
    font-size: 13px;
}

.tgm-marker-details {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px;
    background: #fff;
    z-index: 10;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tgm-close-details {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.tgm-close-details:hover {
    color: #000;
}

.tgm-marker-details-content {
    flex: 1;
    overflow-y: auto;
}

.tgm-marker-details-content h3 {
    margin-top: 0;
}

.tgm-marker-details-content p {
    margin: 10px 0;
}

/* Marker Cluster Styles */
.tgm-map .gm-style-iw {
    max-width: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .tgm-map-content-wrapper {
        flex-direction: column;
    }
    
    .tgm-sidebar {
        width: 100%;
        max-height: 400px;
    }
    
    .tgm-map {
        min-height: 300px;
    }
}

