/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Search Form */
.mls-search-form-container {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.mls-search-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.mls-search-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.mls-search-field input[type="text"],
.mls-search-field input[type="number"],
.mls-search-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.mls-price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mls-price-inputs span {
    flex-shrink: 0;
}

.mls-search-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.mls-search-button,
.mls-reset-button {
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.mls-search-button {
    background: #0073aa;
    color: white;
}

.mls-search-button:hover {
    background: #005a87;
}

.mls-reset-button {
    background: #f7f7f7;
    color: #333;
    border: 1px solid #ccc;
}

.mls-reset-button:hover {
    background: #e9e9e9;
}

/* View Controls */
.mls-view-controls {
    margin-bottom: 20px;
    text-align: center;
}

.mls-view-btn {
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    cursor: pointer;
    border-radius: 3px;
}

.mls-view-btn.active,
.mls-view-btn:hover {
    background: #0073aa;
    color: white;
    border-color: #005a87;
}

/* Grid View */
.mls-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.mls-listing-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
}

.mls-listing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.mls-listing-info {
    padding: 15px;
}

.mls-listing-price {
    font-size: 22px;
    font-weight: 700;
    color: #0073aa;
    margin: 0 0 10px 0;
}

.mls-listing-address {
    font-size: 16px;
    margin: 0 0 10px 0;
    color: #333;
}

.mls-listing-details {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
}

.mls-listing-link {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: white !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.2s;
}

.mls-listing-link:hover {
    background: #005a87;
}

/* List View */
.mls-list-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mls-listing-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.mls-listing-content {
    flex: 1;
}

.mls-listing-content .mls-listing-price {
    margin-top: 0;
}

.mls-listing-content .mls-listing-description {
    color: #555;
    line-height: 1.5;
}

/* Map View */
.mls-map-container {
    width: 100%;
    margin-bottom: 20px;
}

#mls-map {
    width: 100%;
    height: 100%;
}

.mls-map-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#mls-map-canvas {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.mls-map-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.mls-map-listing-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.mls-map-listing-item h4 {
    margin-top: 0;
    color: #0073aa;
}

/* Responsive */
@media (max-width: 768px) {
    .mls-search-filters {
        grid-template-columns: 1fr;
    }
    
    .mls-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .mls-listing-item {
        flex-direction: column;
    }
    
    .mls-listing-item .mls-listing-image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }
    
    .mls-map-listings {
        grid-template-columns: 1fr;
    }
}
