/**
 * Business Directory Frontend Styles
 * 
 * These styles work with standard WordPress template structure
 * and are designed to be theme-agnostic
 */

/* === Business Directory Meta Information === */
.business-directory-meta {
    background: #f9f9f9;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.business-directory-meta h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #0073aa;
    font-size: 1.2em;
}

.business-contact,
.business-rating,
.business-map {
    margin-bottom: 20px;
}

.business-contact:last-child,
.business-rating:last-child,
.business-map:last-child {
    margin-bottom: 0;
}

/* === Contact Information === */
.business-phone,
.business-address,
.business-website,
.business-email,
.business-fax {
    margin-bottom: 8px;
    line-height: 1.5;
}

.business-phone strong,
.business-address strong,
.business-website strong,
.business-email strong,
.business-fax strong {
    display: inline-block;
    min-width: 80px;
    color: #333;
}

/* === Rating Display === */
.business-rating .wpib-rating-display {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wpib-stars {
    color: #ffb900;
    font-size: 1.2em;
}

.wpib-rating-number {
    font-weight: bold;
    color: #0073aa;
}

/* === Map Container === */
.map-container {
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* === Archive/List View === */
.business-categories,
.business-tags {
    margin-bottom: 10px;
}

.business-categories a,
.business-tags a {
    color: #0073aa;
    text-decoration: none;
    padding: 2px 6px;
    background: #e8f4ff;
    border-radius: 3px;
    font-size: 0.9em;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 3px;
}

.business-categories a:hover,
.business-tags a:hover {
    background: #0073aa;
    color: white;
}

/* === Entry Footer - Read More Link === */
.entry-footer .read-more {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.entry-footer .read-more:hover {
    background: #005a87;
    color: white;
}

/* === Navigation === */
.post-navigation {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.post-navigation .nav-subtitle {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.post-navigation .nav-title {
    color: #0073aa;
    font-weight: 600;
}

/* === Pagination === */
.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination .nav-links a,
.pagination .nav-links .current {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    background: white;
}

.pagination .nav-links .current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.pagination .nav-links a:hover {
    background: #f0f0f0;
}

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

.no-results .page-title {
    color: #666;
    margin-bottom: 15px;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .business-directory-meta {
        padding: 15px;
        margin: 15px 0;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
        text-align: center;
    }
    
    .pagination .nav-links {
        gap: 5px;
    }
    
    .pagination .nav-links a,
    .pagination .nav-links .current {
        padding: 6px 10px;
        font-size: 0.9em;
    }
}

/* === Theme Compatibility === */
/* Ensure our styles work with popular themes */
.entry-content .business-directory-meta h3 {
    margin-top: 0 !important;
}

/* Make sure our buttons don't get overridden */
.entry-footer .read-more {
    font-family: inherit;
    line-height: 1.4;
}

/* Ensure proper spacing in Twenty Twenty series themes */
.wp-block-post-content .business-directory-meta,
.entry-content .business-directory-meta {
    margin-left: 0;
    margin-right: 0;
}

/* === IB Directory Fields Shortcode === */
ul.wpib-business-fields {
    list-style: none; /* remove bullets */
    margin: 0; /* reset default margin, keep bottom spacing */
    padding: 0; /* remove left padding */
}
ul.wpib-business-fields li.wpib-field {
    padding: 0 0 6px 0; /* inside vertical padding */
    line-height: 1.4;
}
ul.wpib-business-fields .wpib-field-label {
    font-weight: 600;
    color: #333;
}
ul.wpib-business-fields .wpib-field-value a { 
    text-decoration: none;
}