/* css/search.css: header search overlay and the /search results page. */

/* --- Header button --------------------------------------------------------- */
.djeh-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    align-self: center;
    border-radius: 50%;
    color: #204066;
    font-size: 17px;
    transition: background-color .2s, color .2s;
}
.djeh-search-toggle:hover,
.djeh-search-toggle:focus-visible { background: #f4e3ec; color: #c51871; }
@media (max-width: 1199px) {
    /* The mobile menu button is absolutely positioned at the right edge. */
    .djeh-search-toggle { margin-right: 44px; }
}
@media (max-width: 575px) {
    /* The full-size logo leaves no room for the icon on a phone. 118px is
       the page gutters plus the icon and the menu button. */
    .site-branding { max-width: calc(100vw - 118px); }
    .site-branding #logo-img { max-width: 100%; height: auto; }
}

/* --- Overlay ---------------------------------------------------------------- */
.djeh-search-open { overflow: hidden; }
.djeh-search {
    position: fixed;
    inset: 0;
    z-index: 100000;
    padding: 72px 16px 16px;
    overflow-y: auto;
    background: rgba(18, 37, 61, .72);
}
.djeh-search[hidden] { display: none; }
.djeh-search-panel {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
    overflow: hidden;
}
.djeh-search-form { display: flex; align-items: center; padding: 6px 8px 6px 20px; border-bottom: 1px solid #e8ecf1; }
.djeh-search-form > i { color: #8896a6; font-size: 17px; }
.djeh-search-form input {
    flex: 1;
    min-width: 0;
    height: 52px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #204066;
    font-size: 18px;
}
.djeh-search-form input::-webkit-search-cancel-button { display: none; }
.djeh-search-close {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #5d6b7a;
    font-size: 15px;
    cursor: pointer;
}
.djeh-search-close:hover, .djeh-search-close:focus-visible { background: #eef1f5; color: #204066; }

.djeh-search-body { padding: 16px 20px 18px; }
.djeh-search-heading { margin: 0 0 10px; color: #5d6b7a; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.djeh-search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.djeh-search-chips a {
    padding: 6px 13px;
    border: 1px solid #dfe5ec;
    border-radius: 18px;
    background: #fff;
    color: #204066;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color .2s, color .2s;
}
.djeh-search-chips a:hover, .djeh-search-chips a:focus-visible { border-color: #c51871; color: #c51871; }

.djeh-search-results { margin: 0 -20px; padding: 0; list-style: none; }
.djeh-search-results a { display: block; padding: 10px 20px; color: #204066; }
.djeh-search-results a:hover,
.djeh-search-results .is-active a { background: #fbf1f6; }
.djeh-search-result-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.djeh-search-result-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.djeh-search-result-type { flex: none; color: #7a8796; font-size: 12px; white-space: nowrap; }
.djeh-search-result-snippet { display: block; margin-top: 2px; color: #5d6b7a; font-size: 13px; line-height: 1.45; }
.djeh-search mark, .djeh-sr mark { padding: 0; background: transparent; color: #c51871; font-weight: 700; }
.djeh-search-message { margin: 0; color: #5d6b7a; font-size: 14px; }
.djeh-search-all { display: block; margin: 10px -20px -18px; padding: 12px 20px; border-top: 1px solid #e8ecf1; background: #f8f9fb; color: #c51871; font-size: 14px; font-weight: 600; }
.djeh-search-all:hover { background: #fbf1f6; color: #a4145e; }

@media (max-width: 575px) {
    .djeh-search { padding: 12px; }
    .djeh-search-form input { font-size: 16px; }
    .djeh-search-result-type { display: none; }
}

/* --- Results page ----------------------------------------------------------- */
.djeh-sr-form { position: relative; display: flex; margin-bottom: 24px; }
.djeh-sr-form > i { position: absolute; top: 18px; left: 18px; color: #8896a6; }
.djeh-sr-form input {
    flex: 1;
    min-width: 0;
    height: 52px;
    margin: 0;
    padding: 0 16px 0 46px;
    border: 1px solid #cfd7e0;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    outline: 0;
    background: #fff;
    color: #204066;
    font-size: 16px;
}
.djeh-sr-form input:focus { border-color: #c51871; }
.djeh-sr-form button {
    flex: none;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 0 6px 6px 0;
    background: #c51871;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.djeh-sr-form button:hover, .djeh-sr-form button:focus-visible { background: #a4145e; }

.djeh-sr-summary { margin-bottom: 14px; color: #204066; font-weight: 600; }
.djeh-sr-summary span { color: #6b7886; font-weight: 400; }

.djeh-sr-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; padding-bottom: 14px; border-bottom: 1px solid #e8ecf1; }
.djeh-sr-tabs a { padding: 6px 13px; border-radius: 18px; background: #f2f4f7; color: #204066; font-size: 14px; line-height: 1.4; }
.djeh-sr-tabs a span { margin-left: 3px; color: #6b7886; font-size: 13px; }
.djeh-sr-tabs a:hover { background: #e7ebf0; color: #204066; }
.djeh-sr-tabs a.active { background: #204066; color: #fff; }
.djeh-sr-tabs a.active span { color: #d6dfe9; }

.djeh-sr-list { margin: 0; padding: 0; list-style: none; }
.djeh-sr-item { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid #eef1f4; }
.djeh-sr-thumb { flex: none; order: 2; }
.djeh-sr-thumb img { display: block; width: 120px; height: 84px; object-fit: cover; border-radius: 6px; }
.djeh-sr-body { flex: 1; min-width: 0; }
.djeh-sr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 5px; color: #6b7886; font-size: 13px; line-height: 1.4; }
.djeh-sr-type { color: #c51871; font-weight: 600; }
.djeh-sr-body h2 { margin: 0 0 5px; font-size: 19px; font-weight: 600; line-height: 1.35; }
.djeh-sr-body h2 a { color: #204066; }
.djeh-sr-body h2 a:hover { color: #c51871; }
.djeh-sr-body p { margin: 0; color: #4d5a68; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }

.djeh-sr-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.djeh-sr-pages a { min-width: 38px; padding: 7px 12px; border: 1px solid #dfe5ec; border-radius: 5px; color: #204066; font-size: 14px; line-height: 1.4; text-align: center; }
.djeh-sr-pages a:hover { border-color: #c51871; color: #c51871; }
.djeh-sr-pages a.active { border-color: #204066; background: #204066; color: #fff; }

.djeh-sr-empty { padding: 20px 0 10px; }
.djeh-sr-empty h2 { margin-bottom: 8px; font-size: 22px; }
.djeh-sr-empty p { margin-bottom: 16px; }
.djeh-sr-help { margin: 22px 0 0 !important; }
.djeh-sr-help a { color: #c51871; font-weight: 600; }

@media (max-width: 575px) {
    .djeh-sr-form button { padding: 0 16px; }
    .djeh-sr-thumb img { width: 84px; height: 64px; }
    .djeh-sr-item { gap: 12px; }
    .djeh-sr-body h2 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
    .djeh-search-toggle, .djeh-search-chips a { transition: none; }
}
