/* --- General Recipe Container --- */


/* --- Header and Title --- */
.your-recipe-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.your-recipe-title {
    font-size: 2.8em;
    /* Larger, more prominent title */
    color: #2c3e50;
    margin: 0 0 10px;
    font-weight: 700;
}

.your-recipe-meta {
    display: flex;
    justify-content: space-between;
}
.your-recipe-meta p {
    text-align: center;
}

/* --- Image Slider (Placeholder styles - replace with your chosen library's styles) --- */
.your-recipe-image-slider {
    margin: 20px 0 40px;
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 5px;
    overflow: hidden;
    /* Important for sliders */
}

.your-recipe-main-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* You'll need to enqueue and style your chosen slider library (e.g., Swiper.js CSS) here */

/* --- General Section Styling --- */
.your-recipe-section {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.your-recipe-section:last-child {
    margin-bottom: 0;
}

.your-recipe-nutrition-container {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 10px;
}

.your-recipe-section-title {
    font-size: 2em;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.your-recipe-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #e67e22;
    /* A nice accent color */
}

/* --- Description Section --- */
.your-recipe-description-section .your-recipe-content p {
    font-size: 1.1em;
    color: #555;
}

/* --- Recipe Information Section --- */
.your-recipe-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Responsive grid */
    gap: 15px 25px;
}

.your-recipe-meta-list li {
    font-size: 1.05em;
    color: #666;
    display: flex;
    align-items: center;
}

.your-recipe-meta-list li strong {
    color: #444;
    margin-right: 8px;
    white-space: nowrap;
}

.your-recipe-meta-value {
    font-weight: 600;
}

.your-recipe-meta-value a {
    color: #2980b9;
    text-decoration: none;
}

.your-recipe-meta-value a:hover {
    text-decoration: underline;
}

.your-recipe-tags a {
    background-color: #ecf0f1;
    padding: 4px 8px;
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.9em;
    color: #34495e;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.your-recipe-tags a:hover {
    background-color: #dbe0e1;
}


/* --- Ingredients Section --- */
.your-recipe-ingredient-group-title {
    font-size: 1.6em;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 8px;
}

.your-recipe-ingredient-group-title:first-of-type {
    margin-top: 0;
    /* No top margin for the first group title */
}

.your-recipe-ingredient-list {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
    column-count: 1;
    /* Default to single column */
    column-gap: 30px;
}

@media (min-width: 600px) {
    .your-recipe-ingredient-list {
        column-count: 1;
        /* Two columns on larger screens */
    }
}

.your-recipe-ingredient-item {
    font-size: 1.1em;
    color: #444;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    break-inside: avoid;
    /* Prevent breaking across columns */
}


.yyour-recipe-ingredient-item::before {
    content: '\2022';
    /* Bullet point character */
    color: #e67e22;
    /* Accent color for bullets */
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    font-size: 1.2em;
    line-height: 1;
}

.your-recipe-ingredient-amount-unit {
    font-weight: 600;
    margin-right: 5px;
    color: #555;
}

.your-recipe-ingredient-note {
    font-style: italic;
    color: #888;
    font-size: 0.9em;
    margin-left: 5px;
}

/* --- Method Section --- */
.your-recipe-method-list {
    list-style: none;
    /* Remove default numbering */
    counter-reset: recipe-step;
    /* Initialize step counter */
    padding: 0;
    margin: 0;
}

.your-recipe-method-item {
    padding-bottom: 25px;
    position: relative;
    padding-left: 45px;
    /* Space for custom step number */
    padding-left: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.your-recipe-method-item:hover {
    opacity: 0.8;
}

.your-recipe-method-item.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.your-recipe-method-item.completed .your-recipe-method-title {
    text-decoration: line-through;
}

.your-recipe-method-item.completed::before {
    background-color: #27ae60;
    content: "✓";
    font-size: 1em;
}

.your-recipe-method-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0px;
    top: 30px;
    bottom: 0;
    width: 2px;
    background-color: #e67e22;
    z-index: 1;
}

.your-recipe-method-item.completed:not(:last-child)::after {
    background-color: #27ae60; /* Green line for completed steps */
}

.your-recipe-method-item::before {
    counter-increment: recipe-step;
    content: counter(recipe-step);
    position: absolute;
    left: 0;
    top: 0;
    background-color: #e67e22;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    z-index: 2; /* Ensure circles appear above the connecting lines */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.your-recipe-method-title {
    font-size: 1.4em;
    color: #34495e;
    margin-top: 0;
    margin-bottom: 8px;
}

.your-recipe-method-description p {
    font-size: 1.1em;
    color: #555;
    margin: 0;
}

/* Recipe Notes Styling */
.your-recipe-notes {
    margin-top: 2em;
    padding: 1.5em;
    background-color: #f8f9fa;
    border-left: 4px solid #e67e22;
    border-radius: 0 4px 4px 0;
}

.your-recipe-notes h2 {
    color: #34495e;
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.4em;
}

.your-recipe-notes-content {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
}

.your-recipe-notes-content p {
    margin-bottom: 1em;
}

.your-recipe-notes-content p:last-child {
    margin-bottom: 0;
}

/* Rich content styling for editor content */
.your-recipe-notes-content h1,
.your-recipe-notes-content h2,
.your-recipe-notes-content h3,
.your-recipe-notes-content h4,
.your-recipe-notes-content h5,
.your-recipe-notes-content h6 {
    color: #34495e;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.your-recipe-notes-content h1:first-child,
.your-recipe-notes-content h2:first-child,
.your-recipe-notes-content h3:first-child,
.your-recipe-notes-content h4:first-child,
.your-recipe-notes-content h5:first-child,
.your-recipe-notes-content h6:first-child {
    margin-top: 0;
}

.your-recipe-notes-content ul,
.your-recipe-notes-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.your-recipe-notes-content li {
    margin-bottom: 0.5em;
}

.your-recipe-notes-content blockquote {
    border-left: 4px solid #e67e22;
    padding-left: 1em;
    margin: 1.5em 0;
    font-style: italic;
    color: #666;
}

.your-recipe-notes-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1em 0;
}

.your-recipe-notes-content a {
    color: #e67e22;
    text-decoration: none;
}

.your-recipe-notes-content a:hover {
    text-decoration: underline;
}

.your-recipe-notes-content strong,
.your-recipe-notes-content b {
    font-weight: 600;
    color: #34495e;
}

.your-recipe-notes-content em,
.your-recipe-notes-content i {
    font-style: italic;
}

.your-recipe-notes-content code {
    background-color: #f1f1f1;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.your-recipe-notes-content pre {
    background-color: #f8f9fa;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

.your-recipe-notes-content pre code {
    background: none;
    padding: 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .your-recipe-notes {
        margin-top: 1.5em;
        padding: 1em;
    }
    
    .your-recipe-notes h2 {
        font-size: 1.2em;
    }
    
    .your-recipe-notes-content {
        font-size: 1em;
    }


    .your-recipe-title {
        font-size: 2.2em;
    }

    .your-recipe-section-title {
        font-size: 1.8em;
    }

    .your-recipe-meta {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .your-recipe-title {
        font-size: 1.8em;
    }

    .your-recipe-section-title {
        font-size: 1.5em;
    }
    
    .your-recipe-meta-list {
        grid-template-columns: 1fr;
        /* Single column on small screens */
    }

    .your-recipe-method-item {
        padding-left: 35px;
    }

    .your-recipe-method-item::before {
        width: 25px;
        height: 25px;
        font-size: 1em;
    }
}



/* --- Servings Slider Container --- */
.your-recipe-servings-display {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Space between "Servings:", number, and slider */
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
}

.your-recipe-servings-slider-container {
    flex-grow: 1;
    /* Allow slider to take available space */
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    /* Ensure slider has a minimum width */
}

.your-recipe-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    width: 100%;
    background: #d3d3d3;
    outline: none;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: 5px;
}

.your-recipe-slider:focus {
    outline: none;
}

.your-recipe-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    background: #3071a9;
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}

.your-recipe-slider::-webkit-slider-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -14px;
}

.your-recipe-slider:focus::-webkit-slider-runnable-track {
    background: #367ebd;
}

.your-recipe-slider::-moz-range-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    background: #3071a9;
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}

.your-recipe-slider::-moz-range-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

.your-recipe-slider::-ms-track {
    width: 100%;
    height: 8.4px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    border-width: 16px 0;
    color: transparent;
}

.your-recipe-slider::-ms-fill-lower {
    background: #2a6495;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

.your-recipe-slider::-ms-fill-upper {
    background: #3071a9;
    border: 0.2px solid #010101;
    border-radius: 2.6px;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
}

.your-recipe-slider::-ms-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

.your-recipe-slider:focus::-ms-fill-lower {
    background: #3071a9;
}

.your-recipe-slider:focus::-ms-fill-upper {
    background: #367ebd;
}

.your-recipe-slider:hover {
    opacity: 1;
}

.your-recipe-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    /* Size of the slider thumb */
    height: 20px;
    border-radius: 50%;
    background: #e67e22;
    /* Accent color for thumb */
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.your-recipe-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e67e22;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.your-recipe-slider-min,
.your-recipe-slider-max {
    font-size: 0.9em;
    color: #777;
    white-space: nowrap;
    /* Prevent numbers from wrapping */
}

/* Specific styling for ingredient amount/unit display */
.your-recipe-ingredient-amount-unit {
    min-width: 60px;
    /* Give space for varied amounts */
    text-align: right;
    /* Align numbers right */
    padding-right: 5px;
    /* Space between amount and name */
}

.your-recipe-current-amount {
    font-weight: 600;
    color: #555;
}

.your-recipe-current-unit {
    font-weight: normal;
    /* Unit can be normal weight */
    color: #777;
    margin-left: 3px;
    /* Small space between amount and unit */
}

/* ... (responsive adjustments) */




/* --- Recipe Search Form --- */
.recipe-search-form {
    /* display: flex; */
    gap: 10px;
    margin-bottom: 20px;
}

.recipe-search-form label {
    flex-grow: 1;
    /* Allow label/input to take available space */
}

.recipe-search-form .search-field {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.6em;
    box-sizing: border-box;
    padding: 10px 16px;
    height: unset;
    /* Include padding and border in the element's total width and height */
}

.recipe-search-form .recipe-search-button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.recipe-search-form .search-submit {
    background-color: #e67e22;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    white-space: nowrap;

}

.recipe-search-form .search-submit:hover {
    background-color: #d35400;
    /* Darker shade on hover */
}

.recipe-search-form .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Select2 Styling for Recipe Search */
.recipe-search-form .select2-container {
    width: 100% !important;
}

.recipe-search-form .select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 40px;
    padding: 5px;
    background-color: #fff;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e67e22;
    border: 1px solid #e67e22;
    color: #fff;
    padding: 2px 8px;
    margin: 2px;
    border-radius: 3px;
    font-size: 0.9em;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 5px;
    font-weight: bold;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff6b6b;
}

.recipe-search-form .select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 0;
    height: auto !important;
    padding: 5px;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 1em;
    min-width: 120px;
    position: relative;
    z-index: 10;
}

.recipe-search-form .select2-container--default .select2-search--inline .select2-search__field::placeholder {
    color: #999;
    font-style: italic;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    color: #999;
    font-style: italic;
    padding: 5px;
}

/* Select2 Dropdown Styling */
.recipe-search-form .select2-container--default .select2-dropdown {
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999 !important;
    position: absolute;
}

.recipe-search-form .select2-container--default .select2-dropdown--below {
    z-index: 9999 !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
}

.recipe-search-form .select2-container--default .select2-dropdown--above {
    z-index: 9999 !important;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
}

.recipe-search-form .select2-container--default .select2-results__option {
    padding: 8px 12px;
    color: #333;
    background-color: #fff;
}

.recipe-search-form .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #e67e22;
    color: #fff;
}

.recipe-search-form .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #f0f0f0;
    color: #333;
}

.recipe-search-form .select2-container--default .select2-results__option[aria-selected=true]:hover {
    background-color: #e67e22;
    color: #fff;
}

/* Focus states */
.recipe-search-form .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #e67e22;
    box-shadow: 0 0 0 2px rgba(230, 126, 34, 0.2);
}

/* Loading state */
.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__loading {
    color: #999;
    font-style: italic;
}

/* Fix for minimum input length message overlay */
.recipe-search-form .select2-container--default .select2-selection--multiple {
    position: relative;
    min-height: 40px;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    position: relative;
    z-index: 5;
    min-height: 30px;
    padding: 5px;
}

/* Hide the placeholder text that overlays the input */
.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    display: none !important;
}

/* Alternative: Position placeholder to not interfere */
.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__placeholder {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    z-index: 1;
    pointer-events: none;
    color: #999;
    font-style: italic;
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: 30px;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-search--inline {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 30px;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    width: 100% !important;
    position: relative;
    z-index: 15;
    background: transparent;
    min-height: 30px;
    padding: 5px;
    margin: 0;
}

/* Ensure the search field is always visible and clickable */
.recipe-search-form .select2-container--default.select2-container--focus .select2-selection--multiple .select2-search--inline {
    z-index: 20;
}

.recipe-search-form .select2-container--default.select2-container--focus .select2-selection--multiple .select2-search--inline .select2-search__field {
    z-index: 25;
}

/* Select2 container positioning - let Select2 handle it naturally */
.recipe-search-form .select2-container {
    z-index: 1000;
}

.recipe-search-form .select2-container--open {
    z-index: 1001;
}

.recipe-search-form .select2-container--open .select2-dropdown {
    z-index: 1002 !important;
}

/* Force dropdown to appear below the input */
.recipe-search-form .select2-container--default .select2-dropdown--below {
    margin-top: 2px;
    z-index: 10000 !important;
}

/* Let Select2 handle its own positioning naturally */
.recipe-search-form .select2-container {
    display: inline-block;
    vertical-align: top;
}

/* Position relative wrapper for Select2 dropdown positioning */
.recipe-search-form .position-relative {
    position: relative;
    display: inline-block;
    width: 100%;
}

.recipe-search-form .position-relative .select2-container {
    width: 100% !important;
}

/* Ensure the search field remains visible when dropdown is open */
.recipe-search-form .select2-container--open .select2-selection--multiple .select2-search--inline .select2-search__field {
    z-index: 10001 !important;
    position: relative;
}

/* Additional fix for Select2 minimum input length overlay */
.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered .select2-selection__placeholder {
    display: none !important;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered .select2-selection__clear {
    display: none !important;
}

.select2-container.select2-container--default.select2-container--open:not(.select2-container--below) {
    margin-top: 20px;
}

/* Force the search field to be the only visible element */
.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    order: 1;
}

.recipe-search-form .select2-container--default .select2-selection--multiple .select2-selection__rendered .select2-search--inline {
    order: 2;
    flex: 1;
    min-width: 120px;
}

/* ... (existing .recipe-search-form styling) ... */

.recipe-search-form {
    /* ... existing flex styling ... */
    flex-wrap: wrap;
    /* Allow elements to wrap on smaller screens */
    align-items: flex-end;
    /* Align bottom edges */
}

.recipe-search-form .search-input-group {
    flex-grow: 1;
    min-width: 200px;
    /* Ensure input field has a minimum width */
}

.recipe-search-form .search-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.recipe-search-form .search-filter-select {
    box-sizing: border-box;
    cursor: pointer;
}

@media (max-width: 768px) {
    .recipe-search-form {
        flex-direction: column;
        gap: 15px;
    }

    .recipe-search-form .search-input-group,
    .recipe-search-form .search-filter-group,
    .recipe-search-form .search-submit {
        width: 100%;
        margin-right: 0;
    }

    .recipe-search-form .search-filter-select {
        width: 100%;
    }

    .recipe-search-form .search-filter-group {
        flex-direction: column;
        /* Stack filters vertically on small screens */
    }
}

.recipe-search-form .search-filter-group {
    /* ... existing styles ... */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Use grid for better layout of filters */
    align-items: end;
    /* Align items to the bottom */
}

.recipe-search-form .time-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
    width: 100%;
}

.recipe-search-form .time-input-range {
    display: flex;
    align-items: center;
    gap: 5px;
}

.recipe-search-form .time-input-field {
    width: 60px;
    /* Smaller width for min/max inputs */
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    text-align: center;
}

.recipe-search-form .time-input-range span {
    color: #777;
    font-weight: bold;
}

@media (max-width: 768px) {
    .recipe-search-form .search-filter-group {
        grid-template-columns: 1fr;
        /* Stack filters vertically on small screens */
        gap: 15px;
    }

    .recipe-search-form .time-filter-group {
        width: 100%;
        /* Full width on small screens */
    }

    .recipe-search-form .time-input-field {
        width: 48%;
        /* Adjust for better fit within group */
    }
}

/* Initially hide the advanced search fields */
.recipe-search-form .advanced-search-fields {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.recipe-search-form .advanced-search-fields.is-visible {
    display: block;
    /* Toggled by JavaScript */
}

/* Basic styling for form elements (adjust as needed) */
.recipe-search-form .form-group {
    margin-bottom: 15px;
}


.recipe-search-form input[type="text"],
.recipe-search-form input[type="number"],
.recipe-search-form select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    /* Include padding in width */
}



.recipe-search-form button:hover {
    background-color: #005a87;
}

.recipe-search-form .toggle-advanced-search-button {
    background-color: #666;
}

.recipe-search-form .toggle-advanced-search-button:hover {
    background-color: #444;
}

.recipe-search-form .description {
    font-size: 0.9em;
    color: #777;
    margin-top: 5px;
}

.jmrecipes-meta-icon {
    width: 26px;
}

.recipe-grid-container ul {
    display: flex;
}

.recipe-grid-item {
    width: 50%;
}



.jm-recipe-loop-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Responsive grid */
    gap: 20px;
}

.jm-recipe-loop-item:hover .jm-recipe-loop-featured-image img {
    transform: scale(1.05);
    transition: transform .5s ease;
}

.jm-recipe-loop-featured-image a {
    text-decoration: none;
}



.jm-recipe-loop-headline {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3em;

}

.jm-recipe-loop-headline a {
    font-weight: 600;
    text-decoration: none;
}

.jm-recipe-loop-headline a:hover {
    color: #000;
}

.jm-recipe-loop-meta span {
    display: block;
    /* Each meta item on new line */
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.jm-recipe-loop-excerpt {
    font-size: 0.9em;
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
    flex-grow: 1;
    /* Pushes content to bottom */
}

.jm-recipe-pagination {
    margin-top: 20px;
    text-align: center;
}

.jm-recipe-pagination a {
    margin: 0 5px;
}

/* Ingredient links styling */
.ingredient-link {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ingredient-link:hover {
    color: #005177;
    text-decoration: underline;
}

/* Ingredient single page styling */
.ingredient-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ingredient-header {
    margin-bottom: 30px;
    text-align: center;
}

.ingredient-title {
    font-size: 2.5em;
    margin: 0;
    color: #333;
}

.ingredient-thumbnail {
    text-align: center;
    margin: 20px 0;
}

.ingredient-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ingredient-description {
    margin: 20px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.ingredient-nutrition {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ingredient-nutrition h2 {
    margin-top: 0;
    color: #333;
}

.nutrition-grid {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.nutrition-label {
    font-weight: 500;
    color: #555;
}

.nutrition-value {
    font-weight: 600;
    color: #333;
}

.ingredient-recipes {
    margin: 30px 0;
}

.ingredient-recipes h2 {
    color: #333;
    margin-bottom: 15px;
}

.recipes-list {
    list-style: none;
    padding: 0;
}

.recipes-list li {
    margin: 8px 0;
}

.recipes-list a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.recipes-list a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Collapsible nutrition section */
.your-recipe-nutrition-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.your-recipe-nutrition-toggle:hover {
    color: #0073aa;
}

.nutrition-toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    margin-left: 10px;
    transform: rotate(-90deg);
}

.your-recipe-nutrition-toggle.expanded .nutrition-toggle-icon {
    transform: rotate(0deg);
}

.your-recipe-nutrition-collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.your-recipe-nutrition-collapsible.expanded {
    max-height: 1000px;
    opacity: 1;
    margin: initial;
    padding: initial;
}