/**
 * TurnkeyDir theme-compatibility — extracted inline styles.
 *
 * These rules previously lived inside inline <style> blocks emitted on wp_head
 * by TURNKEYDIR_Theme_Compatibility (includes/class-turnkeydir-theme-compatibility.php). They
 * are 100% static (the only dynamic part of output_compatibility_css() — the
 * :root { --theme-* } custom properties built from detected theme colors —
 * legitimately stays inline). Moved here verbatim so WordPress.org Plugin
 * Check's NoInlineStyles check passes.
 *
 * Enqueued via wp_add_inline_style()/wp_enqueue_style() on the front-end
 * turnkeydir-bundle handle, scoped to TurnkeyDir-owned pages exactly as the original wp_head
 * output was (turnkeydir_is_plugin_page()).
 *
 * The per-theme overrides (Twenty*, Divi, Elementor) are appended at runtime as
 * inline styles on turnkeydir-bundle only when the matching theme/builder is active,
 * so they are not duplicated here.
 */

/* Reset everything for our plugin to prevent conflicts */
.tkd-listing-wrapper,
.tkd-listing-wrapper * {
    box-sizing: border-box !important;
    line-height: normal !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Force proper display */
.tkd-listing-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
    gap: 20px !important;
    clear: both !important;
    float: none !important;
}

/* Content container - exactly 700px width */
.tkd-listing-main {
    width: 700px !important;
    max-width: 100% !important;
    background-color: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Sidebar - 180px width */
.tkd-sidebar {
    width: 180px !important;
    max-width: 180px !important;
    flex: 0 0 180px !important;
    display: block !important;
}

/* Reset heading styles */
.tkd-listing-main h1,
.tkd-listing-main h2,
.tkd-listing-main h3 {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-align: left !important;
}

/* Header content */
.tkd-listing-header {
    padding: 20px !important;
    border-bottom: 1px solid #dadce0 !important;
}

/* Business name */
.tkd-business-name {
    font-size: 24px !important;
    margin: 0 0 4px 0 !important;
    color: #202124 !important;
}

/* Fix for WordPress common themes */
#main .tkd-listing-wrapper,
#content .tkd-listing-wrapper,
.content-area .tkd-listing-wrapper,
.site-content .tkd-listing-wrapper,
article.hentry .tkd-listing-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 20px !important;
}

/* Fix broken images */
.tkd-listing-main img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover !important;
}

/* Fix for responsive layout */
@media (max-width: 1100px) {
    .tkd-listing-wrapper {
        flex-direction: column !important;
        align-items: center !important;
    }

    .tkd-listing-main {
        margin-bottom: 20px !important;
        width: 100% !important;
        max-width: 700px !important;
    }

    .tkd-sidebar {
        width: 100% !important;
        max-width: 700px !important;
        flex: none !important;
    }

    .tkd-ad-placeholder {
        height: 120px !important;
    }
}
