/* ============================================
   Suche – Ergebnisseite /suche/ (Loop 43)
   ============================================
   The header panel is styled in the header component (header.css); this file
   covers only the standalone results page. Both are driven by the same
   assets/js/search.js. */

.suche {
    padding: var(--space-8) 0 var(--space-12);
}

.suche__inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.suche__title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    color: var(--color-ink);
    margin: 0 0 var(--space-2);
}

.suche__lead {
    font-size: var(--text-lg);
    color: var(--color-ink-60);
    margin: 0 0 var(--space-6);
}

/* ---- Input ---- */
.suche__form {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border: 2px solid var(--color-ink);
    border-radius: var(--radius-hand);
    background-color: var(--color-white);
    box-shadow: var(--shadow-watercolor);
    padding: var(--space-3) var(--space-4);
}

.suche__form:focus-within {
    border-color: var(--color-otto-green);
}

/* The placeholder already names the field; keep the label for screen readers. */
.suche__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.suche__icon {
    display: flex;
    flex-shrink: 0;
    color: var(--color-ink);
}

.suche__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.suche__input {
    flex: 1;
    min-width: 0;   /* a flex item will not shrink below its content without this */
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-body);
    font-size: var(--text-xl);
    color: var(--color-ink);
}

.suche__input::-webkit-search-cancel-button {
    display: none;
}

.suche__status {
    margin: var(--space-4) 0 var(--space-2);
    font-family: var(--font-heading);
    color: var(--color-ink-60);
}

/* ---- Results ---- */
.suche__results {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Grid, not flex: pages without a photo would otherwise pull their text to the
   left edge and break the column of titles (same reason as the header panel). */
.suche__hit {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: var(--space-4);
    padding: var(--space-3);
    border: 2px solid var(--color-ink-10);
    border-radius: var(--radius-hand);
    background-color: var(--color-white);
    color: var(--color-ink);
    transition: border-color var(--transition-base);
}

.suche__hit:hover {
    border-color: var(--color-otto-green);
}

.suche__hit-img {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--radius-hand);
}

.suche__hit-body {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.suche__hit-context {
    font-size: var(--text-sm);
    color: var(--color-ink-60);
}

.suche__hit-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    line-height: 1.25;
}

.suche__hit-snippet {
    font-size: var(--text-base);
    color: var(--color-ink-60);
}

/* Small screens: the thumbnail would squeeze the text to a column of syllables. */
@media (max-width: 479.98px) {
    .suche__hit {
        grid-template-columns: 4rem 1fr;
    }

    .suche__hit-img {
        width: 4rem;
        height: 4rem;
    }
}
