/**
 * Custom CSS for Recipe Layout and Filter Widget
 */

/* Layout Row */
.recipe-attribute-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    align-items: center;
    gap: 12px 20px;
    max-width: 100%;
}

.prep-step-row {
    display: flex;
    gap: 40px;
    padding: 16px 0px;
    align-items: flex-start;
}

.prep-step-row:last-child {
    padding-bottom: 0px;
}

/* Number & Text Alignment */
.prep-text-wrapper {
    flex: 1;
    display: flex;
    gap: 15px;
}

.chapmans-custom-checkbox {
    align-self: center;
    width: 15px;
    height: 15px;
    min-width: 15px !important;
    border-radius: 5px;
}

ul.chapmans-checklist li {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 0px !important;
}

.list-text,
.step-content {
    font-size: 14px;
}

.step-number {
    background: var(--e-global-color-primary);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
}

.step-content {
    line-height: 1.6;
    color: #333;
}

/* Image Container */
.prep-image-wrapper {
    flex: 0 0 150px;
}

.custom-prep-img {
    width: 100%;
    height: auto;
    border-radius: 8px !important;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    /* Maintain square aspect ratio */
    object-fit: cover;
    display: block;
}

/* Tablet & Mobile Responsiveness */
@media (max-width: 767px) {
    .prep-step-row {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 0px;
    }

    .prep-image-wrapper {
        flex: 0 0 auto;
        width: 100%;
        max-width: 350px;
    }

    .custom-prep-img {
        aspect-ratio: 16/9;
    }

    .recipe-attribute-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
        gap: 12px 20px;
        max-width: 100%;
    }

    .recipe-filter-widget .filter-title {
        width: 100% !important;
        float: none !important;
    }

    .recipe-attribute-badges .badge-item img{
        max-width: 45px!important;
    }
}

/* Tablet specific adjustments */
@media (min-width:768px) and (max-width: 1024px) {
    .recipe-filter-widget .filter-title {
        width: 100% !important;
    }
}

/* Recipe filter styles */
.recipe-filter-widget .list-style input[type="checkbox"] span {
    border-radius: 9px !important;
    font-size: 14px !important;
}

.recipe-filter-widget .list-style label span {
    display: block;
    padding: 8px 10px;
    margin-bottom: 4px;
    color: #fff;
    background-color: transparent;
    transition: color 0.3s ease;
    border-radius: var(--border-radius-rounded-full, 9999px);
    border: var(--border-width-border, 1px) solid rgba(255, 255, 255, 0.50);
    font-size: 14px !important;

    &:hover {
        background-color: #fff !important;
        color: #000 !important;
    }
}

.recipe-filter-widget .list-style input[type="checkbox"]:checked+span {
    background-color: #fff;
    color: #000;
    font-size: 14px !important;
}

.recipe-filter-widget .filter-title {
    width: 10vw;
    float: left;
}

/* Ensure the form container allows wrapping */
.recipe-filter-widget .form-tax.elementor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}


/* Keep the main categories at 100% width */
.recipe-filter-widget .flex-wrapper.recipe-type,
.recipe-filter-widget .flex-wrapper.occasion,
.recipe-filter-widget .flex-wrapper.content-attribute {
    flex: 1 1 100%;
}

/* Hiding filter for cooking time and serving range but still present in backend if change of mind later */
.flex-wrapper.cooking_time_cooking_time_range,
.recipe-filter-widget .flex-wrapper.serving_range {
    display: none;
}



.flex-wrapper.cooking_time_cooking_time_range ul li:not(:last-child) span:before {
    content: "< ";
}

.recipe-filter-widget .filter-title {
    width: 12vw;
}

.recipe-post-content video {
    border-radius: 14px 14px 14px 14px !important;
    overflow: hidden;
}

@media (min-width:768px) {

    /* Force Cooking Time and Serving Size to sit side-by-side */
    .recipe-filter-widget .flex-wrapper.cooking_time_cooking_time_range,
    .recipe-filter-widget .flex-wrapper.serving_range {
        flex: 1 1 calc(50% - 8px);
        min-width: 200px;

    }

}

.chapmans-social-share-buttons .elementor-grid {
    --grid-column-gap: 8px !important;
    display: flex!important;
    margin: 0px auto !important;
    justify-content: center!important;
}