/* ----------------------------------------------------------------------------
   Search results — `/hladanie?q=`, CU-869fhhch9. `templates/search/results.html.twig`;
   the numbers are `new-hladanie.html`'s. The column, the controls, the tiles and
   the foot are product-listing.css's — the product block is the listing — and
   the article rows are base.css's article cards.
   ---------------------------------------------------------------------------- */

/* ---- Head ---------------------------------------------------------------- */

/* A sentence and not a display heading: the query is what she reads. */
.gk-search__title {
    margin: var(--gk-space-4) 0 0;
    overflow-wrap: break-word;
    color: var(--gk-color-text);
    font-family: var(--gk-font-body);
    font-size: 1.25rem;
    font-weight: var(--gk-weight-normal);
    line-height: 1.75rem;
}

@media (min-width: 768px) {
    .gk-search__title {
        margin-top: var(--gk-space-2);
    }
}

.gk-search__title strong {
    font-weight: var(--gk-weight-semibold);
}

.gk-search__count {
    margin: var(--gk-space-2) 0 0;
}

/* ---- Blocks -------------------------------------------------------------- */

.gk-search__blocks {
    display: flex;
    flex-direction: column;
    gap: var(--gk-space-10);
    margin-top: var(--gk-space-10);
}

.gk-search__blocks:empty {
    display: none;
}

.gk-search__blocks > * {
    min-width: 0;
}

.gk-search__section-title {
    margin: 0;
    color: var(--gk-color-text);
    font-family: var(--gk-font-body);
    font-size: var(--gk-text-lg);
    font-weight: var(--gk-weight-semibold);
    line-height: 1.5rem;
}

/* The sentence above the article rows sits closer to them than a block would. */
.gk-search__note {
    margin: 0 0 calc(-1 * var(--gk-space-4));
    color: var(--gk-color-text);
    font-size: var(--gk-text-base);
    line-height: 1.5rem;
}

.gk-search__note strong {
    font-weight: var(--gk-weight-semibold);
}

/* ---- The rows a query names, and the ways in when nothing is found ------- */

.gk-search__tops {
    display: flex;
    flex-direction: column;
}

.gk-search__dests {
    margin: var(--gk-space-4) 0 0;
    padding: 0;
    list-style: none;
}

.gk-search__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gk-space-4);
    box-sizing: border-box;
    min-height: 3.5rem;
    padding: var(--gk-space-2) 0;
    border-bottom: 1px solid var(--gk-color-border);
    color: var(--gk-color-text);
    text-decoration: none;
}

.gk-search__tops > .gk-search__row:first-child,
.gk-search__dests > li:first-child > .gk-search__row {
    border-top: 1px solid var(--gk-color-border);
}

.gk-search__tops .gk-search__row {
    min-height: 4rem;
}

.gk-search__row-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gk-search__row-name {
    font-size: var(--gk-text-base);
    font-weight: var(--gk-weight-medium);
    line-height: 1.5rem;
}

.gk-search__tops .gk-search__row-name {
    font-weight: var(--gk-weight-semibold);
}

.gk-search__row-sub {
    color: var(--gk-color-text-muted);
    font-size: var(--gk-text-xs);
    line-height: 1rem;
}

.gk-search__row > svg {
    flex: none;
    color: var(--gk-color-text-soft);
}

@media (hover: hover) {
    .gk-search__row:hover .gk-search__row-name {
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 2px;
    }
}

.gk-search__row:active .gk-search__row-name {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.gk-search__row:focus {
    outline: none;
}

.gk-search__row:focus-visible {
    box-shadow: var(--gk-ring-focus);
}

/* ---- The article strip, above the products --------------------------------- */

/* Bleeds to the screen edge on a phone, as Práve trenduje does. */
.gk-search__rail {
    display: flex;
    gap: var(--gk-space-4);
    margin: var(--gk-space-6) calc(-1 * var(--gk-space-4)) 0;
    padding: 0 var(--gk-space-4) var(--gk-space-1);
    overflow-x: auto;
    scrollbar-width: none;
}

.gk-search__rail::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .gk-search__rail {
        margin-inline: 0;
        padding-inline: 0;
    }
}

/* A 56px thumbnail and the headline beside it. */
.gk-search__mini {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    align-items: start;
    column-gap: var(--gk-space-3);
    width: 16.5rem;
    border-radius: var(--gk-radius-md);
    color: var(--gk-color-text);
    text-decoration: none;
}

.gk-search__mini-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--gk-radius-lg);
    background: var(--gk-color-surface-alt);
}

.gk-search__mini-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gk-search__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: color-mix(in srgb, var(--gk-color-text) 55%, transparent);
}

.gk-search__mini-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: var(--gk-text-sm);
    font-weight: var(--gk-weight-semibold);
    line-height: 1.125rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

@media (hover: hover) {
    .gk-search__mini:hover .gk-search__mini-title {
        text-decoration: underline;
    }
}

.gk-search__mini:active .gk-search__mini-title {
    text-decoration: underline;
}

.gk-search__mini:focus {
    outline: none;
}

.gk-search__mini:focus-visible {
    box-shadow: var(--gk-ring-focus);
}

/* ---- Products ------------------------------------------------------------ */

/* Not while pinned: the band's `margin: 0` would lose to this, and the band
   would sit 16px under the header. */
.gk-search .gk-listing__controls:not(.is-pinned) {
    margin-top: var(--gk-space-4);
}

.gk-search .gk-listing__list {
    margin-top: var(--gk-space-4);
}

/* ---- Article rows, where no product matches ------------------------------ */

/* 24px under "Články", as in the prototype. */
.gk-search__rows {
    margin-top: var(--gk-space-6);
}

/* The listing's secondary 48px control, as "Zobraziť ďalšie produkty". */
.gk-search__more {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    margin-top: var(--gk-space-6);
    border: 1px solid var(--gk-color-border);
    border-radius: var(--gk-radius-md);
    background: var(--gk-color-surface);
    color: var(--gk-color-text);
    font-size: var(--gk-text-sm);
    font-weight: var(--gk-weight-semibold);
    line-height: 1.25rem;
    text-decoration: none;
}

@media (hover: hover) {
    .gk-search__more:hover {
        border-color: var(--gk-color-border-strong);
    }
}

.gk-search__more:focus {
    outline: none;
}

.gk-search__more:focus-visible {
    box-shadow: var(--gk-ring-focus);
}

/* ---- No query ------------------------------------------------------------ */

.gk-search__intro-title {
    margin: var(--gk-space-4) 0 0;
    font-size: var(--gk-text-2xl);
    line-height: 2rem;
}

.gk-search__form {
    display: flex;
    gap: var(--gk-space-2);
    margin-top: var(--gk-space-6);
}

.gk-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 3rem;
    padding: 0 var(--gk-space-4);
    border: 1px solid var(--gk-color-border);
    border-radius: var(--gk-radius-full);
    background: var(--gk-color-surface);
    color: var(--gk-color-text);
    font-family: inherit;
    font-size: var(--gk-text-base);
}

.gk-search__input:focus {
    outline: none;
    border-color: var(--gk-color-border-strong);
}

.gk-search__submit {
    flex: none;
    height: 3rem;
    padding: 0 var(--gk-space-5);
    border: 0;
    border-radius: var(--gk-radius-full);
    background: var(--gk-color-brand);
    color: var(--gk-color-on-brand);
    font-family: inherit;
    font-size: var(--gk-text-sm);
    font-weight: var(--gk-weight-semibold);
    cursor: pointer;
}

.gk-search__submit:focus-visible {
    outline: none;
    box-shadow: var(--gk-ring-focus);
}

.gk-search__intro {
    margin: var(--gk-space-4) 0 0;
    color: var(--gk-color-text-soft);
    font-size: var(--gk-text-sm);
    line-height: 1.25rem;
}
