/**
 * Gas Fireplace Locations - Search Page Styles
 * Extends Lestin theme styles for location search functionality
 */

/* ==========================================================================
   Filter Form Styles
   ========================================================================== */

.gf_location_filters {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.gf_location_filters .search_locations {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.gf_location_filters .search_submit {
    flex-shrink: 0;
}

.gf_location_filters .search_submit input[type="submit"] {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.gf_location_filters .search_submit input[type="submit"]:hover {
    background: #c0392b;
}

/* Keywords Input */
.gf-search_keywords {
    flex: 1;
    min-width: 250px;
}

.gf-search_keywords .content-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 0 15px;
}

.gf-search_keywords .icon {
    color: #95a5a6;
    margin-right: 10px;
}

.gf-search_keywords input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 0;
    font-size: 15px;
    outline: none;
}

.gf-search_keywords.focus .content-inner,
.gf-search_keywords.gf-input-loading .content-inner {
    border-color: #3498db;
}

/* Autocomplete Results */
.keyword_list_autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 100;
    margin-top: 0;
}

.gf-autocomplete-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gf-autocomplete-list li {
    border-bottom: 1px solid #f1f3f5;
}

.gf-autocomplete-list li:last-child {
    border-bottom: none;
}

.gf-autocomplete-list a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.gf-autocomplete-list a:hover {
    background: #f8f9fa;
}

/* Region Dropdown */
.filter-by-region {
    flex: 1;
    min-width: 200px;
}

.filter-by-region .content-inner {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 5px;
    padding: 0 15px;
}

.filter-by-region .icon {
    color: #95a5a6;
    margin-right: 10px;
}

.filter-by-region select {
    flex: 1;
    border: none;
    background: transparent;
    padding: 15px 0;
    font-size: 15px;
    outline: none;
}

/* ==========================================================================
   Layout Styles
   ========================================================================== */

/* Half Map Layout */
.gf--map-layout {
    position: relative;
}

.gf-layout-row.half_map-row {
    display: flex;
    gap: 0;
    position: relative;
}

.half_map-col {
    flex: 1;
    min-height: 600px;
}

.col-results {
    overflow-y: auto;
    max-height: calc(100vh - 100px);
    padding: 30px;
}

.col-map {
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
}

#gf-location--map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Mobile Control Buttons */
.half-map-mobile-control {
    display: none;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
}

.half-map-mobile-control a {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.half-map-mobile-control a:hover,
.half-map-mobile-control a.active {
    background: #e74c3c;
    color: #fff;
}

/* ==========================================================================
   Location Grid/List Styles
   ========================================================================== */

.gf-locations-wrapper {
    position: relative;
}

.gf-locations-wrapper.gf-loading {
    opacity: 0.5;
    pointer-events: none;
}

.gf-locations-results-info {
    margin-bottom: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e1e8ed;
}

.gf-showing-results {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.gf-locations-grid {
    display: grid;
    gap: 20px;
}

.gf-no-locations {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 16px;
}

/* Rating Display */
.gf-rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gf-stars {
    color: #f39c12;
    font-size: 14px;
}

.gf-rating-number {
    font-weight: 600;
    color: #333;
}

.gf-rating-count {
    color: #95a5a6;
    font-size: 13px;
}

/* Services Tags */
.gf-services {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gf-service-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #ecf0f1;
    color: #7f8c8d;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* Map Popup Styles */
.gf-map-popup {
    min-width: 250px;
}

.gf-map-popup h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.gf-map-popup h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.gf-map-popup h4 a:hover {
    color: #e74c3c;
}

.gf-map-popup .gf-rating {
    margin-bottom: 10px;
}

.gf-map-popup .gf-phone,
.gf-map-popup .gf-address {
    font-size: 13px;
    color: #7f8c8d;
    margin: 5px 0;
}

.gf-map-popup .gf-view-details {
    display: inline-block;
    margin-top: 10px;
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

.gf-map-popup .gf-view-details:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Pagination Styles
   ========================================================================== */

.gf-locations-pagination {
    margin-top: 30px;
    text-align: center;
}

.gf-locations-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
}

.gf-locations-pagination .page-numbers:hover,
.gf-locations-pagination .page-numbers.current {
    background: #e74c3c;
    color: #fff;
}

/* Load More Button */
.gf-locations-load-more {
    text-align: center;
    margin-top: 30px;
}

.gf-load-more-btn {
    padding: 15px 40px;
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.gf-load-more-btn:hover {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 991px) {
    .gf_location_filters .search_locations {
        flex-direction: column;
    }

    .gf-search_keywords,
    .filter-by-region {
        width: 100%;
    }

    .gf_location_filters .search_submit {
        width: 100%;
    }

    .gf_location_filters .search_submit input[type="submit"] {
        width: 100%;
    }

    /* Half Map Layout - Mobile */
    .gf-layout-row.half_map-row {
        flex-direction: column;
    }

    .half-map-mobile-control {
        display: flex;
    }

    .col-results,
    .col-map {
        max-height: none;
        position: relative;
        top: 0;
    }

    /* Show/hide based on view */
    .gf--content-inner.show-content .col-map {
        display: none;
    }

    .gf--content-inner.show-map .col-results {
        display: none;
    }

    .gf--content-inner.show-map .col-map {
        display: block;
        min-height: 70vh;
    }
}

@media (max-width: 768px) {
    .gf_location_filters {
        padding: 20px;
    }

    .gf-locations-grid {
        gap: 15px;
    }
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.gf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: gf-spin 1s linear infinite;
}

@keyframes gf-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
