/* MJ Location Map - Frontend Styles */

.mj-map-container {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    margin: 30px 0;
    line-height: 1.6;
}

/* Controls Section */
.mj-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mj-filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.mj-filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    min-width: 80px;
    white-space: nowrap;
}

.mj-filter-group select,
.mj-filter-group input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #d1d5db !important;
    border-radius: 6px;
    font-size: 14px;
    min-width: 160px;
    background: white;
    transition: all 0.2s ease;
    flex: 1;
}

.mj-filter-group select:focus,
.mj-filter-group input[type="text"]:focus {
    outline: none;
    border-color: #3084C3;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.mj-search-btn {
    padding: 8px 16px;
    background: #3084C3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}
.mj-reset-btn {
    padding: 8px 16px;
    background: #173d7a;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mj-search-btn:hover, .mj-reset-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.mj-search-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Map Styling */
.mj-map {
    width: 100%;
    height: 500px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

/* Custom Leaflet Overrides */
.leaflet-container {
    font-family: inherit;
}

/* Clean up zoom controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
}

.leaflet-control-zoom a {
    background-color: #fff !important;
    border: none !important;
    color: #666 !important;
    font-size: 18px !important;
    line-height: 28px !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 8px 8px !important;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5 !important;
    color: #333 !important;
}
.sub a {
    color: #3084C3 !important;
}
/* Style attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    padding: 4px 8px !important;
}

/* Custom marker styling */
.leaflet-marker-icon {
}

.brand-marker {
    background: transparent !important;
    border: none !important;
}

.brand-marker img {
    border-radius: 50%;
}

.marker-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
}

/* Search location marker */
.search-marker {
    background: transparent !important;
    border: none !important;
}

.search-marker > div {
    position: relative;
}

.search-marker > div::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid #ef4444;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

/* Popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border: none !important;
}

.leaflet-popup-content {
    margin: 16px 20px 12px 20px !important;
    font-family: inherit !important;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

.leaflet-popup-close-button {
    font-size: 18px !important;
    color: #666 !important;
    font-weight: bold !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 20px !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
    background: #f0f0f0 !important;
    transform: scale(1.1);
}

/* Locations List */
.mj-locations-list {
    margin-top: 30px;
}

.mj-location-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mj-location-item:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.mj-distance {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: 500;
}

.mj-closest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #b6b48e;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: 600;
    font-family: Arial, Helvetica, sans-serif;
}


.mj-closest-star {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.mj-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.mj-details .sub {
    flex: 1;
}

.mj-details h4 {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.mj-details p {
    margin: 5px 0;
    color: #6b7280;
    line-height: 1.2;
    font-size: 1.3rem;
}

.mj-details p strong {
    color: #374151;
    font-weight: 600;
}

.mj-details a {
    color: #3084C3;
    text-decoration: none;
    transition: color 0.2s ease;
        font-size: 1.3rem;
}

.mj-details a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.mj-hours {
    flex-shrink: 0;
    min-width: 220px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.mj-hours strong {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.mj-hours div {
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    white-space: pre-line;
}

/* Loading states */
.mj-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-style: italic;
}

.mj-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3084C3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}
.leaflet-container .leaflet-control-attribution{
    display: none !important;
    opacity: 0 !important;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.mj-empty-state {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

.mj-empty-state h3 {
    margin: 0 0 10px 0;
    color: #374151;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mj-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .mj-filter-group {
        flex-direction: column;
        align-items: stretch;
        min-width: auto;
    }
    
    .mj-filter-group label {
        min-width: auto;
        margin-bottom: 4px;
    }
    
    .mj-filter-group select,
    .mj-filter-group input[type="text"] {
        min-width: auto;
        width: 100%;
    }
    
    .mj-search-btn {
        margin-top: 10px;
        width: 100%;
    }
    
    .mj-details {
        flex-direction: column;
        gap: 20px;
    }
    
    .mj-hours {
        min-width: auto;
        width: 100%;
    }
    
    .mj-map {
        height: 400px;
    }
    
    .mj-location-item {
        padding: 15px;
        margin: 10px 0;
    }
    
    .mj-details h4 {
        font-size: 16px;
    }
    
    .mj-distance,
    .mj-closest-badge {
        display: block;
        margin: 5px 0;
        text-align: center;
        width: fit-content;
    }
}

@media (max-width: 480px) {
    .mj-map-container {
        margin: 20px 0;
    }
    
    .mj-controls {
        padding: 12px;
    }
    
    .mj-map {
        height: 350px;
    }
    
    .mj-location-item {
        padding: 12px;
    }
    
    .mj-details h4 {
        font-size: 15px;
    }
    
    .mj-details p {
        font-size: 13px;
    }
    
    .mj-hours {
        padding: 12px;
    }
}