/**
 * Teachers Map Styles
 * Matching IKYTA site design
 */

.ikyta-teachers-map-container {
    margin: 30px 0;
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ikyta-teachers-map-controls {
    margin-bottom: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 2px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.combined-search-filters-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1479ad;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section-title i {
    margin-right: 8px;
    color: #0073aa;
}

.combined-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 15px;
    align-items: end;
}

@media (min-width: 1400px) {
    .combined-fields-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .combined-fields-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .combined-fields-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .combined-fields-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .combined-fields-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }
}

.map-filter-group {
    min-width: 0;
}

.map-filter-group .map-filter,
.map-filter-group input.map-filter {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.search-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
    justify-content: space-between;
}

.search-actions .button {
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.search-actions .button-primary {
    background: #0073aa;
    border-color: #0073aa;
}

.search-actions .button-primary:hover {
    background: #1479ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,115,170,0.3);
}

.search-actions .button:not(.button-primary) {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #333;
}

.search-actions .button:not(.button-primary):hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.map-stats-inline {
    margin-left: auto;
    font-size: 13px;
    font-weight: 500;
    color: #0073aa;
    text-align: right;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
}

.map-stats-inline #teachers-count {
    font-size: 16px;
    font-weight: 600;
    color: #1479ad;
    margin-right: 4px;
}

.map-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.map-filter-group label {
    font-weight: 700;
    color: #1479ad;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.map-filter-group label i {
    margin-right: 8px;
    color: #0073aa;
    font-size: 16px;
}

.map-filter {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    min-width: 180px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-weight: 500;
}

.map-filter:hover {
    border-color: #0073aa;
}

.map-filter:focus {
    outline: none;
    border-color: #1479ad;
    box-shadow: 0 0 0 3px rgba(20, 121, 173, 0.15);
    background: #f8f9fa;
}

.radius-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.radius-search-container input {
    width: 120px;
}

.radius-search-container .button {
    white-space: nowrap;
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 115, 170, 0.2);
}

.radius-search-container .button:hover {
    background: #1479ad;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3);
}

.radius-search-container .button:active {
    transform: translateY(0);
}

/* Old map-stats removed - now using map-stats-inline */

#ikyta-teachers-map {
    position: relative;
    min-height: 600px;
    width: 100%;
    background: #f8f9fa;
}

#ikyta-teachers-map img {
    max-width: none;
}

.map-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 115, 170, 0.1);
    border-top: 5px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.map-loading p {
    margin-top: 20px;
    color: #1479ad;
    font-size: 18px;
    font-weight: 600;
}

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

.teacher-info-window .teacher-photo {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.teacher-info-window .teacher-details {
    padding: 15px;
}

.teacher-info-window .teacher-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
}

.teacher-info-window .teacher-spiritual-name {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin: 0 0 10px 0;
}

.teacher-info-window .teacher-location {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.teacher-info-window .teacher-location i {
    margin-right: 5px;
    color: #0073aa;
}

.teacher-info-window .teacher-specialties {
    margin: 10px 0;
}

.teacher-info-window .teacher-specialties span {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
    color: #333;
}

.teacher-info-window .teacher-membership-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.teacher-info-window .membership-active {
    background: #46b450;
    color: white;
}

.teacher-info-window .membership-inactive {
    background: #dc3232;
    color: white;
}

.teacher-info-window .view-profile-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: #0073aa;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.3s;
}

.teacher-info-window .view-profile-btn:hover {
    background: #005a87;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .ikyta-teachers-map-controls {
        padding: 15px;
    }
    
    .combined-search-filters-section {
        padding: 15px;
    }
    
    .combined-fields-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .map-filter-group {
        width: 100%;
    }
    
    .map-filter {
        width: 100%;
    }
    
    .radius-search-container {
        flex-direction: column;
    }
    
    .radius-search-container input,
    .radius-search-container .button {
        width: 100%;
    }
    
    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-actions .button {
        width: 100%;
    }
    
    .map-stats-inline {
        margin-left: 0;
        text-align: center;
        margin-top: 10px;
    }
}
