/* Business Directory Frontend Styles */

.bd-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search and Filters */
.bd-search-filters {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bd-search-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.bd-search-field {
    flex: 1;
}

.bd-filter-field {
    min-width: 200px;
}

.bd-search-field input,
.bd-filter-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.bd-search-field input:focus,
.bd-filter-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* View Toggle */
.bd-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.bd-view-btn {
    padding: 10px 20px;
    border: 2px solid #2563eb;
    background: #fff;
    color: #2563eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.bd-view-btn:hover {
    background: #f1f5f9;
}

.bd-view-btn.active {
    background: #2563eb;
    color: #fff;
}

/* Business Cards */
.bd-businesses-list {
    display: grid;
    gap: 20px;
}

.bd-business-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.bd-business-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.bd-business-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 15px;
}

.bd-business-name {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.bd-category-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.bd-business-content {
    color: #4b5563;
    line-height: 1.6;
}

.bd-business-address {
    font-size: 16px;
    margin-bottom: 12px;
    color: #6b7280;
}

.bd-business-description {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.bd-business-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.bd-contact-item {
    font-size: 14px;
    color: #6b7280;
}

.bd-contact-item a {
    color: #2563eb;
    text-decoration: none;
}

.bd-contact-item a:hover {
    text-decoration: underline;
}

/* Rating */
.bd-business-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bd-star {
    color: #d1d5db;
    font-size: 18px;
}

.bd-star.filled {
    color: #fbbf24;
}

.bd-rating-text {
    font-size: 14px;
    color: #6b7280;
    margin-left: 4px;
}

/* Map */
.bd-map {
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bd-map-controls {
    margin-bottom: 15px;
    text-align: right;
}

.bd-button {
    padding: 10px 20px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.bd-button:hover {
    background: #1d4ed8;
}

/* Map Popup */
.bd-map-popup h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.bd-popup-category {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.bd-popup-address {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.bd-popup-description {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.4;
}

.bd-map-popup div {
    margin-bottom: 4px;
    font-size: 13px;
}

.bd-map-popup a {
    color: #2563eb;
    text-decoration: none;
}

.bd-map-popup a:hover {
    text-decoration: underline;
}

/* Load More */
.bd-load-more {
    text-align: center;
    margin-top: 30px;
}

/* Loading */
.bd-loading {
    text-align: center;
    padding: 40px;
}

.bd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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

/* No Results */
.bd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .bd-directory {
        padding: 15px;
    }
    
    .bd-search-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .bd-filter-field {
        min-width: auto;
    }
    
    .bd-business-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bd-business-name {
        font-size: 20px;
    }
    
    .bd-business-contact {
        flex-direction: column;
        gap: 8px;
    }
    
    .bd-view-toggle {
        justify-content: center;
    }
    
    .bd-map {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .bd-business-card {
        padding: 16px;
    }
    
    .bd-business-name {
        font-size: 18px;
    }
    
    .bd-view-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}