/* ===================================
   Elementor Compatibility Fixes
   =================================== */

/* Reset Elementor's container constraints */
.elementor-widget-shortcode .plm-finder-wrapper,
.elementor-widget-text-editor .plm-finder-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}

/* Ensure full width in Elementor sections */
.elementor-section .plm-finder-wrapper {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Fix Elementor's button styling conflicts */
.elementor-widget-shortcode .plm-btn,
.elementor-widget-text-editor .plm-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    outline: none !important;
}

.elementor-widget-shortcode .plm-btn-primary,
.elementor-widget-text-editor .plm-btn-primary,
.elementor-widget-shortcode .plm-btn-primary:link,
.elementor-widget-text-editor .plm-btn-primary:link,
.elementor-widget-shortcode .plm-btn-primary:visited,
.elementor-widget-text-editor .plm-btn-primary:visited,
.elementor-widget-shortcode .plm-btn-primary:active,
.elementor-widget-text-editor .plm-btn-primary:active {
    background: #1e5074 !important;
    color: #fff !important;
    border: none !important;
}

.elementor-widget-shortcode .plm-btn-primary:hover,
.elementor-widget-text-editor .plm-btn-primary:hover {
    background: #163f5a !important;
    color: #fff !important;
}

.elementor-widget-shortcode .plm-btn-secondary,
.elementor-widget-text-editor .plm-btn-secondary,
.elementor-widget-shortcode .plm-btn-secondary:visited,
.elementor-widget-text-editor .plm-btn-secondary:visited {
    background: #f7f9fa !important;
    color: #14171a !important;
    border: 1px solid #e1e8ed !important;
}

.elementor-widget-shortcode .plm-btn-secondary:hover,
.elementor-widget-text-editor .plm-btn-secondary:hover {
    background: #e8f5fe !important;
    color: #1e5074 !important;
    border-color: #1e5074 !important;
}

.elementor-widget-shortcode .plm-tab-btn,
.elementor-widget-text-editor .plm-tab-btn {
    background: none !important;
}

.elementor-widget-shortcode .plm-tab-btn.active,
.elementor-widget-text-editor .plm-tab-btn.active {
    color: #1e5074 !important;
    border-bottom-color: #1e5074 !important;
}

.elementor-widget-shortcode .plm-tab-btn:hover,
.elementor-widget-text-editor .plm-tab-btn:hover {
    color: #1e5074 !important;
}

/* Fix Elementor heading conflicts */
.elementor-widget-shortcode h3,
.elementor-widget-text-editor h3 {
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin: 0 0 12px 0 !important;
}

/* Fix Elementor link styling */
.elementor-widget-shortcode a,
.elementor-widget-text-editor a {
    text-decoration: none !important;
}

/* Ensure proper spacing in Elementor columns */
.elementor-column .plm-doctors-grid {
    margin: 0 !important;
}

/* Fix Elementor's default paragraph margins */
.elementor-widget-shortcode p,
.elementor-widget-text-editor p {
    margin-bottom: 12px !important;
}

/* Fix select dropdown styling in Elementor */
.elementor-widget-shortcode select,
.elementor-widget-text-editor select {
    appearance: auto !important;
    -webkit-appearance: auto !important;
    background-image: none !important;
}

/* Ensure images don't get constrained oddly */
.elementor-widget-shortcode .plm-doctor-photo,
.elementor-widget-text-editor .plm-doctor-photo {
    max-width: none !important;
    width: 80px !important;
    height: 80px !important;
}

/* Fix Elementor container padding issues */
.elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-shortcode {
    margin: 0 !important;
}

/* Responsive fixes for Elementor mobile view */
@media (max-width: 1024px) {
    .elementor-section .plm-finder-results {
        grid-template-columns: 1fr !important;
    }
}

/* Fix Elementor's box-sizing on cards */
.elementor-widget-shortcode .plm-doctor-card,
.elementor-widget-shortcode .plm-location-card {
    box-sizing: border-box !important;
}

/* Override Elementor's transition effects */
.elementor-widget-shortcode .plm-doctor-card,
.elementor-widget-text-editor .plm-doctor-card {
    transition: all 0.3s ease !important;
}

/* Fix input field styling */
.elementor-widget-shortcode input[type="text"],
.elementor-widget-shortcode input[type="tel"],
.elementor-widget-text-editor input[type="text"],
.elementor-widget-text-editor input[type="tel"] {
    min-height: auto !important;
    line-height: normal !important;
    padding: 12px 16px !important;
}
