/* Suggestion panel of the recipe search forms (Customizations\RecipeSearch,
   recipe-search.js). Colours from the theme's variables (child style.css,
   "Brand identity"). */

/* Platea pads the popup 120px above and below the field; with the panel
   under it that pushed the suggestions off the screen. The popup scrolls
   when it is taller than the screen. */
.gt-search-box .gt-search-box-container {
    max-height: 100vh;
    padding: 72px 0 48px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

@media (max-width: 767px) {
    .gt-search-box .gt-search-box-container {
        padding: 40px 0 32px;
    }
}

.yt-search-panel {
    margin-top: 28px;
    color: var(--gt-text-color-secondary, #162a28);
    font-family: halyard-text-variable, "Halyard Text", system-ui, sans-serif;
    text-align: left;
}

.yt-search-panel[aria-busy="true"] {
    opacity: .6;
    transition: opacity .15s ease .2s;
}

.yt-search-panel ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.yt-search-section + .yt-search-section {
    margin-top: 24px;
}

.yt-search-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 10px;
}

.yt-search-title {
    color: var(--yt-brand-muted, #5f6b68);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.yt-search-panel .yt-search-clear {
    padding: 0;
    border: 0;
    background: none;
    color: var(--gt-theme-primary, #ff4400);
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
}

.yt-search-panel .yt-search-clear:hover {
    color: var(--yt-brand-green, #162a28);
}

/* Options */
.yt-search-panel a.yt-search-option,
.yt-search-panel a.yt-search-option:visited {
    color: var(--gt-text-color-secondary, #162a28);
    text-decoration: none;
}

.yt-search-panel mark {
    padding: 0;
    background: none;
    color: var(--gt-theme-primary, #ff4400);
    font-weight: 700;
}

/* Chips: recent searches, quick links */
.yt-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.yt-search-chips li {
    position: relative;
}

.yt-search-panel a.yt-search-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border: 1px solid var(--gt-theme-tertiary, #dedcd4);
    border-radius: 999px;
    background: #fff;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.3;
    transition: border-color .15s ease, background-color .15s ease;
}

.yt-search-chip svg {
    flex: none;
    color: var(--yt-brand-muted, #5f6b68);
}

.yt-search-recent a.yt-search-chip {
    padding-right: 34px;
}

.yt-search-panel a.yt-search-chip.is-active,
.yt-search-panel a.yt-search-chip:focus-visible {
    border-color: var(--gt-theme-primary, #ff4400);
    background: var(--yt-surface, #fff2ea);
}

.yt-search-panel .yt-search-remove {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--yt-brand-muted, #5f6b68);
    font-size: 1.125rem;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.yt-search-panel .yt-search-remove:hover,
.yt-search-panel .yt-search-remove:focus-visible {
    background: var(--yt-surface, #fff2ea);
    color: var(--gt-theme-primary, #ff4400);
}

/* "Elindeki malzemelerle tarif bul" */
.yt-search-panel a.yt-search-finder {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 560px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: var(--yt-surface, #fff2ea);
    transition: border-color .15s ease;
}

.yt-search-panel a.yt-search-finder.is-active,
.yt-search-panel a.yt-search-finder:focus-visible {
    border-color: var(--gt-theme-primary, #ff4400);
}

.yt-search-finder-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--gt-theme-primary, #ff4400);
}

.yt-search-finder-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: .8125rem;
    color: var(--yt-brand-muted, #5f6b68);
}

.yt-search-finder-text strong {
    color: var(--gt-text-color-secondary, #162a28);
    font-size: .9375rem;
    font-weight: 600;
}

.yt-search-finder > svg {
    flex: none;
    color: var(--gt-theme-primary, #ff4400);
}

/* Suggestions: recipes on the left, categories and ingredients on the right */
.yt-search-results {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 40px;
}

.yt-search-side .yt-search-section + .yt-search-section {
    margin-top: 20px;
}

.yt-search-recipes ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 20px;
}

.yt-search-panel a.yt-search-recipe {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    margin: 0 -8px;
    border-radius: 12px;
    transition: background-color .15s ease;
}

.yt-search-thumb {
    flex: none;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: 10px;
    background: var(--yt-surface, #fff2ea);
}

.yt-search-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-search-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.yt-search-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.yt-search-meta {
    color: var(--yt-brand-muted, #5f6b68);
    font-size: .8125rem;
    line-height: 1.3;
}

.yt-search-panel a.yt-search-term {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px;
    margin: 0 -10px;
    border-radius: 10px;
    transition: background-color .15s ease;
}

.yt-search-panel a.yt-search-recipe.is-active,
.yt-search-panel a.yt-search-recipe:focus-visible,
.yt-search-panel a.yt-search-term.is-active,
.yt-search-panel a.yt-search-term:focus-visible {
    background: var(--yt-surface, #fff2ea);
    outline: none;
}

/* "Tüm sonuçları gör" */
.yt-search-panel a.yt-search-all {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    padding: 14px 18px;
    border: 1px solid var(--gt-theme-tertiary, #dedcd4);
    border-radius: 14px;
    font-size: .9375rem;
    font-weight: 600;
    transition: border-color .15s ease, background-color .15s ease;
}

.yt-search-all > svg:first-child {
    flex: none;
    color: var(--yt-brand-muted, #5f6b68);
}

.yt-search-count {
    margin-left: auto;
    color: var(--yt-brand-muted, #5f6b68);
    font-size: .8125rem;
    font-weight: 500;
}

.yt-search-all > svg:last-child {
    flex: none;
    color: var(--gt-theme-primary, #ff4400);
}

.yt-search-panel a.yt-search-all.is-active,
.yt-search-panel a.yt-search-all:focus-visible {
    border-color: var(--gt-theme-primary, #ff4400);
    background: var(--yt-surface, #fff2ea);
    outline: none;
}

.yt-search-panel .yt-search-empty {
    margin: 0;
    font-size: .9375rem;
}

@media (max-width: 991px) {
    .yt-search-results {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .yt-search-recipes ul {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The same panel as a dropdown under the search forms of the page (front
   page hero, title bar, empty search result, side menu): recipe-search.js
   wraps the form in .yt-search-anchor (the form's width) and puts the panel
   under it. Text colours are set again, since the title bar over a photo
   is white. */
.yt-search-anchor {
    position: relative;
}

.yt-search-panel.yt-search-panel--dropdown {
    position: absolute;
    z-index: 60;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(70vh, 560px);
    margin: 0;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--gt-theme-tertiary, #dedcd4);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .14);
    color: var(--gt-text-color-secondary, #162a28);
    font-size: 1rem;
    line-height: 1.4;
}

.yt-search-panel--dropdown p,
.yt-search-panel--dropdown .yt-search-name {
    color: var(--gt-text-color-secondary, #162a28);
}

.yt-search-panel--dropdown .yt-search-results {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.yt-search-panel--dropdown .yt-search-section + .yt-search-section {
    margin-top: 16px;
}

@media (max-width: 767px) {
    .yt-search-panel.yt-search-panel--dropdown {
        padding: 14px;
        border-radius: 16px;
    }
}
