/**
 * PASDO Listing Engine - Master Stylesheet
 * Integrates Search UI, Hierarchical Branding, and UX Fallbacks.
 */

/* 1. SCROLL ANCHOR OFFSET & UX */
/* Ensures the jump lands with padding below sticky headers */
#pasdo-results-anchor {
    display: block;
    position: relative;
    top: -120px; 
    visibility: hidden;
    height: 0;
}

/* 2. SEARCH BAR UI */
.pasdo-search-bar-wrap {
    max-width: 800px;
    margin: 20px auto;
    padding: 10px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pasdo-input-group input#pasdo-location-autocomplete {
    font-size: 16px;
    color: #333;
    transition: border-color 0.3s ease;
}

.pasdo-input-group input#pasdo-location-autocomplete:focus {
    border-color: #178851 !important;
    outline: none;
}

/* 3. GOOGLE AUTOCOMPLETE DROPDOWN (Branding Override) */
.pac-container {
    border-radius: 0 0 8px 8px;
    margin-top: -2px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    font-family: inherit;
    z-index: 9999; /* Ensure it stays above Elementor layers */
}

.pac-item {
    padding: 10px 15px;
    cursor: pointer;
}

.pac-item:hover {
    background-color: #f4f9f6;
}

.pac-item-query {
    font-size: 15px;
    color: #178851;
}

/* 4. SEARCH RESULTS TITLE & HONEST HIGHLIGHT */
.pasdo-title-section {
    border-left: 5px solid #178851;
    padding-left: 20px;
    margin: 40px 0;
}

.pasdo-results-header {
    margin: 5px 0 0 0;
    color: #178851;
    font-weight: 700;
}

.pasdo-highlight {
    color: #178851;
    font-style: italic;
    background: rgba(23, 136, 81, 0.05);
    padding: 0 5px;
    border-radius: 3px;
}

/* 5. LISTING WRAPPERS (Separation Logic) */
.pasdo-listings-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Internal vs External Visual Identity */
.pasdo-type-internal .pasdo-listing-item-container {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease;
}

.pasdo-type-internal .pasdo-listing-item-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* External Listings Separation */
.pasdo-type-external {
    margin-top: 50px;
    opacity: 0.9;
}

.pasdo-type-external::before {
    content: "Opportunities from our Partners";
    display: block;
    font-weight: 700;
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.pasdo-type-external .pasdo-listing-item-container {
    background: #fafafa;
    border: 1px dashed #ccc;
}

/* 6. DATA INJECTOR STYLING */
.pasdo-loc-breadcrumb {
    font-size: 0.85em;
    color: #178851;
    font-weight: 600;
    text-transform: uppercase;
}

.pasdo-tax-item {
    margin-bottom: 5px;
    font-size: 14px;
}

.pasdo-tax-label {
    color: #555;
    font-weight: 600;
}

.pasdo-date {
    display: inline-block;
    padding: 2px 8px;
    background: #eee;
    border-radius: 4px;
    font-size: 12px;
    color: #777;
}

/* 7. FALLBACK BUTTON & ACTIONS */
.pasdo-btn-main {
    display: inline-block;
    padding: 14px 28px;
    background-color: #178851;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
}

.pasdo-btn-main:hover {
    background-color: #126e41;
    transform: scale(1.05);
}

/* Responsive Grid */
@media (min-width: 768px) {
    .pasdo-listings-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}