/* Business Directory Frontend Styles */

/* Custom Heading Colors */
.bd-directory-wrapper h1,
.bd-directory-wrapper h2,
.bd-directory-wrapper h3,
.bd-submit-wrapper h1,
.bd-submit-wrapper h2,
.bd-submit-wrapper h3,
.single-business_listing h1,
.single-business_listing h2,
.single-business_listing h3 {
    color: #7e0d0d !important;
}

/* Directory Container */
.bd-directory-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.bd-directory-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5em;
}

/* Filters */
.bd-filters {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.bd-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

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

.bd-filter-field.bd-filter-submit {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
}

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

.bd-input:focus,
.bd-select:focus {
    border-color: #7e0d0d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(126, 13, 13, 0.1);
}

/* Buttons */
.bd-button {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.bd-button-primary {
    background: #7e0d0d;
    color: #fff;
}

.bd-button-primary:hover {
    background: #5a0a0a;
    color: #fff;
}

.bd-button-secondary {
    background: #666;
    color: #fff;
}

.bd-button-secondary:hover {
    background: #444;
    color: #fff;
}

.bd-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Listings Grid */
.bd-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.bd-listing-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.bd-listing-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.bd-listing-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.bd-listing-title a {
    color: #7e0d0d;
    text-decoration: none;
}

.bd-listing-title a:hover {
    text-decoration: underline;
}

.bd-listing-meta {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.bd-listing-category {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 3px;
    color: #666;
}

.bd-listing-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.bd-listing-contact {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.bd-listing-contact > div {
    margin-bottom: 8px;
}

.bd-listing-contact > div:last-child {
    margin-bottom: 0;
}

.bd-listing-link {
    display: inline-block;
    color: #7e0d0d;
    text-decoration: none;
    font-weight: 600;
}

.bd-listing-link:hover {
    text-decoration: underline;
}

/* Pagination */
.bd-pagination {
    text-align: center;
    margin-top: 40px;
}

.bd-pagination a,
.bd-pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.bd-pagination a:hover {
    background: #7e0d0d;
    color: #fff;
}

.bd-pagination .current {
    background: #7e0d0d;
    color: #fff;
}

/* No Results */
.bd-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.bd-no-results p {
    font-size: 1.2em;
    color: #666;
}

/* Submit Form */
.bd-submit-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.bd-submit-title {
    text-align: center;
    margin-bottom: 10px;
}

.bd-submit-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.bd-form-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.bd-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #7e0d0d;
    border-bottom: 2px solid #7e0d0d;
    padding-bottom: 10px;
}

.bd-form-row {
    margin-bottom: 20px;
}

.bd-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.bd-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s;
}

.bd-textarea:focus {
    border-color: #7e0d0d;
    outline: none;
    box-shadow: 0 0 0 3px rgba(126, 13, 13, 0.1);
}

.bd-word-count {
    text-align: right;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.bd-word-count.warning {
    color: #f39c12;
    font-weight: bold;
}

.bd-word-count.error {
    color: #e74c3c;
    font-weight: bold;
}

/* Verification Section */
.bd-verification-code-row {
    margin-top: 15px;
}

#bd-verification-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

#bd-verification-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#bd-verification-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Form Messages */
#bd-form-messages {
    margin-top: 20px;
}

.bd-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.bd-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bd-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bd-success-message {
    text-align: center;
    padding: 60px 20px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
}

.bd-success-message h2 {
    color: #155724;
    margin-bottom: 15px;
}

.bd-success-message p {
    color: #155724;
    font-size: 1.1em;
}

/* Single Business Page */
.bd-single-business {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.bd-business-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.bd-business-title {
    margin: 0 0 15px 0;
    font-size: 2.5em;
}

.bd-business-meta {
    color: #666;
    font-size: 1.1em;
}

.bd-business-meta span {
    margin: 0 10px;
}

.bd-business-details {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.bd-detail-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.bd-detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bd-detail-label {
    width: 150px;
    font-weight: 600;
    color: #333;
}

.bd-detail-value {
    flex: 1;
    color: #555;
}

.bd-detail-value a {
    color: #7e0d0d;
    text-decoration: none;
}

.bd-detail-value a:hover {
    text-decoration: underline;
}

.bd-business-description {
    line-height: 1.8;
    font-size: 1.1em;
    color: #444;
}

.bd-back-link {
    display: inline-block;
    margin-top: 30px;
    color: #7e0d0d;
    text-decoration: none;
    font-weight: 600;
}

.bd-back-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bd-directory-wrapper,
    .bd-submit-wrapper,
    .bd-single-business {
        padding: 15px;
    }
    
    .bd-directory-title {
        font-size: 1.8em;
    }
    
    .bd-filter-row {
        flex-direction: column;
    }
    
    .bd-filter-field {
        min-width: 100%;
    }
    
    .bd-filter-field.bd-filter-submit {
        flex-direction: column;
        width: 100%;
    }
    
    .bd-listings-grid {
        grid-template-columns: 1fr;
    }
    
    .bd-listing-card {
        padding: 20px;
    }
    
    .bd-detail-item {
        flex-direction: column;
    }
    
    .bd-detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .bd-business-title {
        font-size: 1.8em;
    }
    
    .bd-pagination a,
    .bd-pagination span {
        padding: 8px 12px;
        margin: 2px;
    }
}

@media (max-width: 480px) {
    .bd-button {
        width: 100%;
    }
    
    .bd-form-section {
        padding: 20px 15px;
    }
}
