/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 1 version
*/

/*------------------------------------*\
    
    Widgets CSS
 
    FX Popular Posts Widget

\*------------------------------------*/

.widget-popular-posts .popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-popular-posts .popular-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.widget-popular-posts .popular-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-popular-posts .popular-post-thumbnail {
    flex-shrink: 0;
}

.widget-popular-posts .popular-post-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.widget-popular-posts .popular-post-content {
    flex: 1;
    min-width: 0; /* Allows text truncation */
}

.widget-popular-posts .popular-post-title {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.widget-popular-posts .popular-post-title a {
    color: var(--color-black, #252525);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.widget-popular-posts .popular-post-title a:hover {
    color: var(--color-orange, #E67E22);
    text-decoration: none;
}

.widget-popular-posts .popular-post-date {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.widget-popular-posts .popular-post-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 5px 0 0 0;
}

/* Widget Error Message (when plugin not active) */
.widget-error {
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .widget-popular-posts .popular-post-item {
        gap: 10px;
    }
    
    .widget-popular-posts .popular-post-img {
        width: 60px;
        height: 60px;
    }
    
    .widget-popular-posts .popular-post-title {
        font-size: 15px;
    }
}

/* Variation without thumbnail */
.widget-popular-posts .popular-post-item:not(:has(.popular-post-thumbnail)) {
    display: block;
}

/*------------------------------------*\
    
    Post Type Search Widget
    Matches theme's .widget_search styling

\*------------------------------------*/

.widget_post_type_search {
    /* Widget ordering - ensure proper display order */
    position: relative;
    display: block;
}

.widget_post_type_search h3 {
    margin-bottom: 15px;
}

.widget_post_type_search .post-type-search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.widget_post_type_search .search-form-wrapper {
    position: relative;
    display: flex;
    width: 100%;
}

/* Match existing widget_search styling */
.widget_post_type_search .search-field {
    flex: 1;
    background: #EEEBE1;
    border-radius: 4px !important;
    padding: 12px 16px;
    font-size: 16px;
    min-height: 50px;
    color: #252525;
    font-weight: 400;
    position: relative;
    border: none !important;
    border-bottom: 4px solid #C7C4BA !important;
}

.widget_post_type_search .search-field:focus {
    outline: none;
    background: #EEEBE1;
}

/* Match existing widget_search button styling */
.widget_post_type_search .search-submit {
    font-family: "Inter", sans-serif;
    width: 100px;
    border: none;
    border-bottom: none;
    background: var(--color-orange);
    border-radius: 4px;
    outline: none;
    height: 50px;
    color: #fff;
    font-weight: 400;
    font-size: 16px;
    padding: 0 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget_post_type_search .search-submit:hover {
    opacity: 0.9;
}

.widget_post_type_search .search-submit:active {
    transform: scale(0.98);
}

.widget_post_type_search .search-submit i {
    font-size: 18px;
}

/* SearchWP Live Search results styling */
.widget_post_type_search .searchwp-live-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .widget_post_type_search .search-form-wrapper {
        flex-direction: column;
    }
    
    .widget_post_type_search .search-submit {
        width: 100%;
    }
}

