/* Search Filters Responsive Styles */
.search-filters-container {
    background-color: #fff;
}

.active-filters-wrapper {
    border-color: #dc3545 !important;
    background-color: #fff;
}

/* Filter chip styling to match contact button */
.filter-chip {
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: transparent !important;
    color: var(--color-primary) !important;
    border: 1px solid var(--color-primary) !important;
    border-radius: 20px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.filter-chip:hover {
    background-color: var(--color-primary) !important;
    color: #fff !important;
    border-color: var(--color-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.filter-chip:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 123, 255, 0.3);
}

.btn-close-sm {
    font-size: 12px;
    padding: 0.25rem;
    opacity: 0.7;
    margin-left: 8px;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-close-sm:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.filter-chip:hover .btn-close-sm {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Mobile responsive adjustments */
@media (max-width: 767.98px) {
    .active-filters-wrapper .d-flex {
        gap: 1rem !important;
    }
    
    .active-filters-wrapper .d-flex > div:last-child {
        margin-top: 0.5rem;
    }
    
    .filter-chip {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Filter Modal */

#filterModal .list-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

#filterModal .list-horizontal li {
    margin: 0;
    width: auto;
min-width: max-content;
}

#filterModal .list-horizontal .form-check {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin: 0;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
}

#filterModal .list-horizontal .form-check:hover {
    background: transparent;
}

#filterModal .list-horizontal .form-check-input {
    margin-right: 0.5rem;
    margin-left: 0;
}

#filterModal .list-horizontal .form-check-label {
    font-size: 0.875rem;
    max-width: 200px;
}

/* Show more/less functionality */
#filterModal .filter-widget__body {
    max-height: none;
    overflow: visible;
}

#filterModal .filters-scroll {
    max-height: none;
    overflow: visible;
}

#filterModal .show-more-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    display: inline-block;
}

#filterModal .show-more-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #212529;
}

#filterModal .hidden-items {
    display: none;
}

#filterModal .hidden-items.show {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.2rem;
}

/* Teachers Map Styles */

.teacher-marker-info {
    max-width: 600px;
    width: 100%;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    margin-top: 8px;
    overflow: hidden;
    word-wrap: break-word;
}

.teacher-marker-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.teacher-photo-section {
    flex-shrink: 0;
}
/* Google Maps InfoWindow styling - reduce close button space */
.gm-style-iw-d { 
    overflow-x: auto !important; 
    padding: 0 !important;
}

/* Target all Google Maps InfoWindow elements */
.gm-style-iw-c,
.gm-style-iw-t,
.gm-style-iw-b,
.gm-style-iw-tc,
.gm-style-iw-bc {
    background: #fff !important;
}

/* Remove default close button styling */
.gm-style-iw-t::after,
.gm-style-iw-tc::after {
    display: none !important;
}

/* Make the close button area smaller */
.gm-style-iw-tc,
.gm-style-iw-bc {
    height: 8px !important;
    background: #fff !important;
}

/* Hide the default close button completely */
.gm-style-iw-tc {
    display: none !important;
}

/* Alternative approach - target the close button more specifically */
div[role="button"][aria-label*="Close"],
div[role="button"][aria-label*="close"],
.gm-style-iw-tc > div {
    display: none !important;
}

/* Make the info window more compact */
.gm-style-iw {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.gm-style-iw-c {
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* Additional comprehensive styling for Google Maps InfoWindow */
.gm-style-iw-tc {
    display: none !important;
}

.gm-style-iw-bc {
    display: none !important;
}

/* Reposition the close button to take less space */
.gm-style-iw-chr {
    position: absolute !important;
    top: 5px !important;
    right: 15px !important;
    left: auto !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1000 !important;
}

/* Target the close button with multiple selectors */
.gm-style-iw-tc > div,
.gm-style-iw-tc > button,
.gm-style-iw-tc > span,
[role="button"][aria-label*="Close"],
[role="button"][aria-label*="close"],
.gm-style-iw-tc [role="button"] {
    display: none !important;
}

/* Remove any default close button styling */
.gm-style-iw-t::after,
.gm-style-iw-tc::after,
.gm-style-iw-tc::before {
    display: none !important;
    content: none !important;
}

/* Make sure the info window content takes full space */
.gm-style-iw-d {
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure the teacher marker info has proper spacing */
.teacher-marker-info {
    margin: 0 !important;
    padding: 15px !important;
}

.teacher-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border, #e9ecef);
}

.teacher-info-section {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.teacher-marker-header h6 {
    color: var(--color-primary, #007bff);
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.teacher-marker-rating {
    font-size: 13px;
    color: var(--color-secondary, #6c757d);
    margin-top: 4px;
}

.rating-value {
    font-weight: bold;
    color: var(--color-warning, #ffc107);
}

.teacher-marker-details p {
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
    color: #000;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.teacher-addresses-section {
    margin: 12px 0;
}

.teacher-addresses-section h6 {
    font-size: 13px;
    color: var(--color-primary, #007bff);
    margin-bottom: 10px;
    border-bottom: 2px solid var(--color-border, #e9ecef);
    padding-bottom: 6px;
    font-weight: 600;
}

.default-address {
    background: #f8f9fa;
    border-left: 3px solid var(--color-primary, #007bff);
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.additional-locations-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.other-address {
    background: #fff;
    border-left: 3px solid #6c757d;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.address-header {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    font-weight: 600;
}

.address-text {
    font-size: 13px;
    color: #000;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.teacher-marker-actions {
    margin-top: 15px;
    border-top: 2px solid var(--color-border, #e9ecef);
    padding-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow: hidden;
}

/* Custom marker icon styling */
.teacher-marker-info::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .teacher-marker-info {
        width: auto;
        padding: 12px;
        overflow-x: hidden;
    }
    
    .teacher-marker-header {
        gap: 8px;
    }
    
    .teacher-photo {
        width: 40px;
        height: 40px;
    }
    
    .teacher-marker-header h6 {
        font-size: 13px;
    }
    
    .teacher-marker-details p {
        font-size: 12px;
    }
    
    .teacher-addresses-section h6 {
        font-size: 12px;
    }
    
    .address-text {
        font-size: 12px;
    }
    
    .teacher-marker-actions {
        flex-direction: column;
    }
    
    .teacher-marker-actions .btn {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* City and State Autocomplete Styles */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.city-suggestion,
.state-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
    color: #333;
}

.city-suggestion:hover,
.state-suggestion:hover {
    background-color: #f8f9fa;
    color: var(--color-primary);
}

.city-suggestion:last-child,
.state-suggestion:last-child {
    border-bottom: none;
}

/* Position relative for autocomplete container */
.field_cover {
    position: relative;
}

/* Mobile responsive for autocomplete */
@media (max-width: 767.98px) {
    .autocomplete-suggestions {
        max-height: 150px;
    }
    
    .city-suggestion,
    .state-suggestion {
        padding: 8px 12px;
        font-size: 13px;
    }
}
