/* CBBC global search results and homepage suggestions */
.global-search-suggestions {
    display: none;
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: left;
}

.global-search-suggestions.is-visible { display: block; }

.global-search-suggestion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 17px;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
    text-decoration: none;
}

.global-search-suggestion:last-child { border-bottom: 0; }
.global-search-suggestion:hover,
.global-search-suggestion:focus-visible { background: var(--blue-light); outline: none; }
.global-search-suggestion strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.global-search-suggestion small { display: block; margin-top: 2px; color: var(--text-light); font-size: 11px; }
.global-search-suggestion .suggestion-type { flex-shrink: 0; color: var(--blue-dark); font-size: 11px; font-weight: 700; }
.global-search-suggestion-message { padding: 14px 17px; color: var(--text-light); font-size: 13px; }

.global-search-page { min-height: 65vh; background: var(--background); }
.global-search-hero {
    padding: 66px 0 58px;
    background: linear-gradient(135deg, var(--blue-light), var(--green-light));
}
.global-search-hero h1 {
    margin: 10px 0 8px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.2;
}
.global-search-hero p { margin: 0; color: var(--text-light); }
.global-search-form {
    display: flex;
    gap: 9px;
    max-width: 780px;
    margin-top: 25px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.global-search-form input {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 13px;
    border: 0;
    outline: none;
    color: var(--text);
    font: inherit;
}
.global-search-form button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--blue-dark);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.global-search-form button:hover { background: var(--green-dark); }
.global-search-results-section { padding: 48px 0 85px; }
.global-search-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}
.global-search-heading h2 {
    margin: 7px 0 4px;
    color: var(--navy);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(25px, 3vw, 34px);
}
.global-search-heading p { margin: 0; color: var(--text-light); font-size: 13px; }
.global-search-back { color: var(--blue-dark); font-size: 13px; font-weight: 700; white-space: nowrap; }
.global-search-note { margin: 0 0 18px; color: #8a5a14; font-size: 13px; }
.global-search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.global-search-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.global-search-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.global-search-file-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--blue-light); font-size: 21px; }
.global-search-type { padding: 5px 9px; border-radius: 7px; background: var(--green-light); color: var(--green-dark); font-size: 10px; font-weight: 800; letter-spacing: .05em; }
.global-search-collection { color: var(--blue-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.global-search-card h3 { margin: 5px 0 7px; color: var(--navy); font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.global-search-path { margin: 0; color: var(--text-light); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.global-search-meta { margin: 9px 0 0; color: var(--text-light); font-size: 11px; }
.global-search-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.global-search-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 13px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.global-search-open { background: var(--blue-dark); color: #fff; }
.global-search-download { border: 1px solid var(--border); color: var(--navy); }
.global-search-empty { max-width: 620px; margin: 0 auto; padding: 40px 24px; border: 1px dashed var(--border); border-radius: 16px; background: #fff; text-align: center; }
.global-search-empty-icon { color: var(--blue-dark); font-size: 38px; }
.global-search-empty h2 { margin: 8px 0; color: var(--navy); font-family: "Playfair Display", Georgia, serif; }
.global-search-empty p { margin: 0; color: var(--text-light); font-size: 14px; line-height: 1.7; }

@media (max-width: 700px) {
    .global-search-hero { padding: 48px 0 42px; }
    .global-search-form { gap: 5px; }
    .global-search-form button { padding: 0 16px; }
    .global-search-heading { align-items: flex-start; flex-direction: column; }
    .global-search-grid { grid-template-columns: 1fr; }
    .global-search-card { padding: 18px; }
}
