/* =======================================================
   1. STYLING: LISTING TYPE (Button Group + Mobile Stack)
   Targeting: custom-radio-5
   ======================================================= */

/* MASTER CONTAINER */
.directorist-custom-field-radio:has(input[name="custom-radio-5"]) {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    width: 100% !important;
    margin-top: 5px !important;
}

/* WRAPPER RESET */
.directorist-custom-field-radio:has(input[name="custom-radio-5"]) .directorist-radio {
    width: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    display: flex !important;
}

/* HIDE INPUT & ICONS */
input[name="custom-radio-5"] {
    display: none !important; 
}

input[name="custom-radio-5"] + label::before,
input[name="custom-radio-5"] + label::after,
.directorist-custom-field-radio:has(input[name="custom-radio-5"]) .directorist-radio::before,
.directorist-custom-field-radio:has(input[name="custom-radio-5"]) .directorist-radio::after {
    display: none !important;
    content: none !important;
}

/* THE BUTTON (Label Styling) */
input[name="custom-radio-5"] + label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    
    /* Dimensions */
    min-width: 120px !important;
    padding: 12px 25px !important;
    
    /* Visuals */
    background-color: #fff !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 6px !important;
    color: #555 !important;
    
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
}

/* SELECTED STATE */
input[name="custom-radio-5"]:checked + label {
    background-color: #007cba !important;
    border-color: #007cba !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 124, 186, 0.3) !important;
}

/* HOVER STATE */
input[name="custom-radio-5"] + label:hover {
    border-color: #bbb !important;
    background-color: #f9f9f9 !important;
    color: #333 !important;
}
input[name="custom-radio-5"]:checked + label:hover {
    background-color: #006ba1 !important;
    border-color: #006ba1 !important;
    color: #ffffff !important;
}

/* MOBILE RESPONSIVENESS (Max Width 767px) */
@media (max-width: 767px) {
    /* Stack the container vertically */
    .directorist-custom-field-radio:has(input[name="custom-radio-5"]) {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Force wrapper to full width */
    .directorist-custom-field-radio:has(input[name="custom-radio-5"]) .directorist-radio {
        width: 100% !important;
        display: flex !important;
    }
    
    /* Force Button Label to full width */
    input[name="custom-radio-5"] + label {
        width: 100% !important;
        min-width: 0 !important; 
        flex: 1 1 auto !important;
        padding: 14px 10px !important; 
    }
}


/* =======================================================
   2. CLEAN GRID LOGIC (For Elementor "Show Verified Only")
   Hides Sidebar, Filters, and Tabs when active
   ======================================================= */

.wc-force-verified-grid .directorist-listing-search-form-wrap,
.wc-force-verified-grid .directorist-search-result-header, 
.wc-force-verified-grid .directorist-filter-sidebar,
.wc-force-verified-grid .directorist-pagination-wrapper,
.wc-force-verified-grid .directorist-listing-tab-wrap {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

/* Force the Content Column to Full Width (since sidebar is hidden) */
.wc-force-verified-grid .directorist-listing-content-wrap,
.wc-force-verified-grid .col-lg-8 {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Remove extra padding from container */
.wc-force-verified-grid .directorist-container-fluid {
    padding: 0 !important;
    margin: 0 !important;
}