/*
 Theme Name:   Guido Child
 Theme URI:    https://themeforest.net/item/guido-directory-listing-wordpress-theme/36719791
 Description:  Guido Child Theme
 Author:       ApusTheme
 Author URI:   http://apusthemes.com
 Template:     guido
 Version:      1.0.0
 Text Domain:  guido-child
*/


/* Fix Google Login Button on Mobile */
@media (max-width: 768px) {
    .google-login-btn-wrapper {
        width: 100% !important;
        display: block !important;
        margin-top: 15px !important;
    }
    .google-login-btn {
        width: 100% !important;
        white-space: nowrap !important;
        min-width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }
}
.google-login-btn {
    white-space: nowrap !important;
}

/* Unified Header Search Bar Redesign */
#apus-header .widget-listing-search-form .list-fileds {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: center !important;
    justify-content: flex-end !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* Hide all columns by default */
#apus-header .widget-listing-search-form .list-fileds > div {
    display: none !important;
}

/* Show only Keyword input and Search button */
#apus-header .widget-listing-search-form .list-fileds > div:has(.form-group-title),
#apus-header .widget-listing-search-form .list-fileds > div:first-child,
#apus-header .widget-listing-search-form .list-fileds > div.form-group-search {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

#apus-header .widget-listing-search-form .list-fileds > div:has(.form-group-title) {
    flex-grow: 1 !important;
    width: 100% !important;
}
/* Fallback */
#apus-header .widget-listing-search-form .list-fileds > div:first-child {
    flex-grow: 1 !important;
    width: 100% !important;
}
#apus-header .widget-listing-search-form .list-fileds > div.form-group-search {
    flex-grow: 0 !important;
    width: auto !important;
}

/* Style the text input */
#apus-header .widget-listing-search-form .form-group {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}
#apus-header .widget-listing-search-form .form-group-title .form-control {
    border: none !important;
    background: transparent !important;
    padding: 0 15px 0 0 !important;
    margin: 0 !important;
    height: 44px !important;
    box-shadow: none !important;
    font-size: 15px !important;
    border-radius: 0 6px 6px 0 !important;
    color: #4b5563 !important;
    width: 100% !important;
}

/* Style the submit button */
#apus-header .widget-listing-search-form .btn-submit {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #888 !important;
    padding: 0 10px 0 15px !important;
    margin: 0 !important;
    height: 44px !important;
    font-size: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px 0 0 6px !important;
}
#apus-header .widget-listing-search-form .btn-submit:hover {
    color: #333 !important;
}

/* Hide Advance Search Button if present */
#apus-header .widget-listing-search-form .list-fileds .advance-link {
    display: none !important;
}

/* Additional overrides to ensure clean white pill look */
#apus-header .widget-listing-search-form .search-form-inner {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}
#apus-header .widget-listing-search-form .content-main-inner {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}
#apus-header .widget-listing-search-form .list-fileds {
    border: 1px solid #ddd !important;
}

/* Fix Listing Detail Gallery Overlap and Distortion with Small Images */
.listing-detail-gallery-v1 {
    min-height: 480px !important;
    background-color: #f7f7f7 !important;
    position: relative !important;
    width: 100% !important;
}

.listing-detail-gallery-v1 .listing-single-gallery-wrapper {
    height: 100% !important;
}

.listing-detail-gallery-v1 .slick-list,
.listing-detail-gallery-v1 .slick-track,
.listing-detail-gallery-v1 .p-popup-image {
    height: 100% !important;
    min-height: 480px !important;
}

.listing-detail-gallery-v1 .p-popup-image img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    min-height: 480px !important;
}

@media (max-width: 768px) {
    .listing-detail-gallery-v1 {
        min-height: 300px !important;
    }
    .listing-detail-gallery-v1 .slick-list,
    .listing-detail-gallery-v1 .slick-track,
    .listing-detail-gallery-v1 .p-popup-image {
        min-height: 300px !important;
    }
    .listing-detail-gallery-v1 .p-popup-image img {
        min-height: 300px !important;
    }
}


/* Ensure Submit Listing form actions clear floating elements and stay on top */
.listing-submission-preview-form-wrapper form {
    clear: both !important;
    position: relative !important;
    z-index: 100 !important;
    margin-bottom: 30px !important;
}
.wrapper-action-listing {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}
.listing-submission-preview-form-wrapper .wrapper-action-listing .btn {
    margin: 0 !important;
}


/* General protective styles for listing header galleries against small images */
.listing-single-layout .position-relative {
    clear: both !important;
}
.listing-single-gallery-wrapper {
}
.listing-single-gallery-wrapper img {
    object-position: center center !important;
}


/* Fix Listing Cards Grid image consistency */
.listing-item .listing-image {
    position: relative !important;
    overflow: hidden !important;
    padding-bottom: 70% !important; /* 10:7 aspect ratio roughly */
    background: #f1f2f4 !important;
}

.listing-item .listing-image img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Change review stars to green */
.review-stars-rated .review-stars.filled,
.star-rating span:before,
.star-rating::before,
.rating-wrapper .review-stars.filled,
.woocommerce .star-rating span::before {
    color: #d9e70b !important;
}
.review-stars-rated .review-stars li i {
    color: #d9e70b; /* inherit from the ul */
}


/* Comprehensive green stars override */
.review-stars-rated .review-stars.filled,
.review-stars-rated .review-stars.filled li,
.review-stars-rated .review-stars.filled i,
.review-stars-rated .review-stars.filled span,
.star-rating span:before,
.star-rating::before,
.rating-wrapper .review-stars.filled,
.woocommerce .star-rating span::before,
.single-rating .stars-value .fa-star,
.single-rating .stars-value .fas.fa-star,
.listing-review .star-rating,
.listing-review .star-rating i,
.listing-review .star-rating span {
    color: #d9e70b !important;
}

