/**
 * SafeSyntax Service Locations Map - Frontend Styles
 */

/* Container */
.sslm-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Filters Section */
.sslm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sslm-filter-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.sslm-filter-item label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.sslm-input,
.sslm-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    background: #fff;
}

.sslm-input:focus,
.sslm-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.sslm-button {
    padding: 10px 20px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
    margin-top: auto;
}

.sslm-button:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.sslm-button:active {
    transform: translateY(0);
}

.sslm-button-secondary {
    background: #6c757d;
}

.sslm-button-secondary:hover {
    background: #5a6268;
}

/* Content Wrapper */
.sslm-content-wrapper {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* Sidebar */
.sslm-sidebar {
    flex: 0 0 350px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    max-height: 800px;
}

.sslm-sidebar-title {
    margin: 0;
    padding: 20px;
    background: #0066cc;
    color: #fff;
    border-radius: 8px 8px 0 0;
    font-size: 18px;
    font-weight: 600;
}

.sslm-location-count {
    font-size: 14px;
    opacity: 0.9;
    font-weight: normal;
}

.sslm-locations-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.sslm-locations-list::-webkit-scrollbar {
    width: 8px;
}

.sslm-locations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.sslm-locations-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.sslm-locations-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Location Cards */
.sslm-location-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.sslm-location-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.sslm-location-card.sslm-active {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.sslm-location-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
}

.sslm-location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sslm-location-card:hover .sslm-location-image img {
    transform: scale(1.05);
}

.sslm-location-content {
    padding: 15px;
}

.sslm-location-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.sslm-location-content p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.sslm-location-content p strong {
    color: #333;
    font-weight: 600;
}

.sslm-location-content a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s;
}

.sslm-location-content a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.sslm-location-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.sslm-view-details-btn,
.sslm-zoom-location-btn {
    flex: 1;
    padding: 8px 12px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.sslm-view-details-btn {
    background: #0066cc;
    color: #fff;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.sslm-view-details-btn:hover {
    background: #0052a3;
    text-decoration: none;
}

.sslm-zoom-location-btn {
    background: #fff;
    color: #0066cc;
    border: 1px solid #0066cc;
}

.sslm-zoom-location-btn:hover {
    background: #0066cc;
    color: #fff;
}

/* No Locations Message */
.sslm-no-locations {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.sslm-no-locations p {
    margin: 0;
    font-size: 14px;
}

/* Map Wrapper */
.sslm-map-wrapper {
    flex: 1;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sslm-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Loading Spinner */
.sslm-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.sslm-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066cc;
    border-radius: 50%;
    animation: sslm-spin 1s linear infinite;
}

@keyframes sslm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sslm-loading p {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* Info Window Styles */
.sslm-info-window {
    padding: 10px;
    max-width: 300px;
}

.sslm-info-window h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.sslm-info-window p {
    margin: 5px 0;
    font-size: 13px;
    color: #666;
}

.sslm-info-window strong {
    color: #333;
}

.sslm-info-link {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background: #0066cc;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.sslm-info-link:hover {
    background: #0052a3;
    text-decoration: none !important;
}

/* Boundary Info Window */
.sslm-boundary-info {
    padding: 10px;
    font-size: 13px;
}

.sslm-boundary-info strong {
    color: #333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sslm-content-wrapper {
        flex-direction: column;
    }
    
    .sslm-sidebar {
        flex: 0 0 auto;
        max-height: 400px;
        order: 2;
    }
    
    .sslm-map-wrapper {
        order: 1;
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .sslm-filters {
        flex-direction: column;
    }
    
    .sslm-filter-item {
        min-width: 100%;
    }
    
    .sslm-sidebar {
        max-height: 300px;
    }
    
    .sslm-location-actions {
        flex-direction: column;
    }
    
    .sslm-view-details-btn,
    .sslm-zoom-location-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sslm-container {
        padding: 10px 0;
    }
    
    .sslm-filters {
        padding: 15px;
        gap: 10px;
    }
    
    .sslm-sidebar {
        flex: 0 0 250px;
    }
    
    .sslm-location-content {
        padding: 10px;
    }
    
    .sslm-map {
        min-height: 400px;
    }
}

/* Print Styles */
@media print {
    .sslm-filters,
    .sslm-location-actions {
        display: none;
    }
    
    .sslm-content-wrapper {
        flex-direction: column;
    }
}

