/* Busca (/buscar): cabeçalho, caixa de pesquisa, sugestões, gêneros e resultados. */
.search-page { padding-top: 28px; padding-bottom: 72px; }

.search-hero { max-width: 880px; margin: 0 auto 8px; text-align: left; }
.search-heading {
    font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; line-height: .98;
    font-size: clamp(2.2rem, 6vw, 3.9rem); margin: 0 0 22px; overflow-wrap: anywhere;
}

.search-box {
    position: relative; display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border-strong, var(--border));
    border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box-icon { width: 20px; height: 20px; flex: 0 0 auto; color: var(--muted); }
.search-input {
    flex: 1 1 auto; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: 1.05rem; color: var(--text); padding: 12px 4px; appearance: none;
}
.search-input::placeholder { color: var(--muted); opacity: .9; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-submit { flex: 0 0 auto; border-radius: 999px; min-height: 46px; padding: 0 22px; gap: 8px; }
.search-submit .icon { width: 18px; height: 18px; }

.search-summary { margin: 14px 4px 0; color: var(--muted); font-size: .95rem; }

/* Sugestões ao digitar */
.search-suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); padding: 6px; max-height: 420px; overflow-y: auto; display: none;
}
.search-suggest.is-open { display: block; }
.search-suggest-item {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px;
    color: var(--text); text-decoration: none; min-width: 0;
}
.search-suggest-item:hover, .search-suggest-item.is-active { background: var(--surface-2); }
.search-suggest-thumb {
    width: 36px; height: 52px; flex: 0 0 auto; border-radius: 8px; overflow: hidden;
    background: var(--surface-3); display: grid; place-items: center; color: var(--muted);
}
.search-suggest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-suggest-text { min-width: 0; display: grid; gap: 2px; }
.search-suggest-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest-sub { font-size: .82rem; color: var(--muted); }
.search-suggest-all {
    display: block; margin: 4px 0 2px; padding: 10px; text-align: center; font-weight: 700;
    color: var(--accent-text); border-radius: 12px; text-decoration: none;
}
.search-suggest-all:hover { background: var(--accent-soft); }
.search-suggest-empty { padding: 14px 12px; color: var(--muted); font-size: .92rem; }

/* Gêneros */
.search-genres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 22px; }
.search-genres .muted { color: var(--muted); font-size: .9rem; margin-right: 4px; }

.genre-tiles {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px;
}
.genre-tile {
    --tile-hue: 260;
    position: relative; display: flex; align-items: flex-end; min-height: 92px; padding: 14px 16px;
    border-radius: var(--radius-lg); text-decoration: none; color: #fff; font-weight: 800;
    font-family: var(--font-display); font-size: 1.25rem; letter-spacing: .01em; overflow: hidden;
    background:
        linear-gradient(160deg, hsl(var(--tile-hue) 48% 40%) 0%, hsl(calc(var(--tile-hue) + 22) 52% 22%) 100%);
    box-shadow: var(--shadow);
    transition: transform .15s ease, filter .15s ease;
}
.genre-tile::after {
    content: ""; position: absolute; right: -18px; top: -18px; width: 72px; height: 72px;
    border-radius: 50%; background: rgba(255, 255, 255, .14);
}
.genre-tile:hover { transform: translateY(-2px); filter: brightness(1.06); }
.genre-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.genre-tile span { position: relative; z-index: 1; overflow-wrap: anywhere; }

.search-block-title { margin: 8px 0 14px; }
.search-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

/* Celular */
@media (max-width: 640px) {
    .search-page { padding-top: 18px; }
    .search-heading { font-size: 2.2rem; margin-bottom: 16px; }
    .search-box { border-radius: 18px; flex-wrap: wrap; padding: 10px; gap: 8px; }
    .search-box-icon { position: absolute; left: 18px; top: 22px; }
    .search-input { padding: 12px 8px 12px 40px; width: 100%; flex-basis: 100%; }
    .search-submit { width: 100%; justify-content: center; min-height: 48px; }
    .search-suggest { border-radius: 16px; }
    .genre-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .genre-tile { min-height: 76px; font-size: 1.1rem; }
}

/* "Você quis dizer?" (alpha.105) */
.search-didyoumean { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 1rem; }
.search-didyoumean .icon { width: 18px; height: 18px; color: var(--accent-text, var(--accent)); }
.search-didyoumean a { color: inherit; }

/* Busca por voz e pela descrição (alpha.112) */
.search-voice { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.search-voice[hidden] { display: none; }
.search-voice svg { width: 20px; height: 20px; }
.search-voice:hover, .search-voice:focus-visible { color: var(--text); background: var(--surface-2); }
.search-voice.is-listening { color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.search-voice-status { margin: 8px 0 0; color: var(--text-soft); font-size: .92rem; }
.search-voice-status[hidden] { display: none; }
.search-described .section-head { display: grid; gap: 4px; }
.search-described .section-head .muted { margin: 0; font-size: .9rem; }
