/**
 * Styling for the indexed_search (EXT:indexed_search) frontend output.
 * Plain, readable list layout. Brand colour: #0171BB.
 */

/* ---------- shared tokens ---------- */
:root {
    --is-brand: #0171BB;
    --is-brand-dark: #015a91;
    --is-ink: #2b2f33;
    --is-muted: #75797d;
    --is-line: #e3e6ea;
}

/* ---------- search box ---------- */
.tx-indexedsearch-searchbox {
    margin-bottom: 26px;
}
.tx-indexedsearch-searchbox form { margin: 0; }
/* lay the fieldset out as a row: input grows, button sits to its right */
.tx-indexedsearch-searchbox fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}
.tx-indexedsearch-searchbox legend {
    flex: 1 0 100%;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    border: 0;
    font-size: 1em;
    font-weight: 600;
    color: var(--is-ink);
}
.tx-indexedsearch-form {
    flex: 1 1 220px;
    min-width: 0;
    margin: 0;
}
.tx-indexedsearch-form label {
    display: block;
    margin-bottom: 3px;
    font-size: .82em;
    color: var(--is-muted);
}
.tx-indexedsearch-searchbox-sword,
input.tx-indexedsearch-searchbox-sword {
    width: 100%;
    height: auto;
    padding: 9px 12px;
    font-size: 15px;
    line-height: 1.3;
    color: var(--is-ink);
    background: #fff;
    border: 1px solid var(--is-line);
    border-radius: 5px;
    box-shadow: none;
    transition: border-color .15s;
}
.tx-indexedsearch-searchbox-sword:focus {
    outline: none;
    border-color: var(--is-brand);
}
/* submit is a plain layout wrapper – only the input inside is the button */
.tx-indexedsearch-search-submit {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}
.tx-indexedsearch-searchbox-button,
input.tx-indexedsearch-searchbox-button {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--is-brand);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background .15s;
}
.tx-indexedsearch-searchbox-button:hover,
input.tx-indexedsearch-searchbox-button:hover { background: var(--is-brand-dark); }

/* ---------- "your search" line ---------- */
.tx-indexedsearch-info-sword {
    margin: 0 0 6px;
    font-size: 1em;
    color: var(--is-muted);
}
.tx-indexedsearch-info-sword-word { color: var(--is-ink); font-weight: 600; }

/* ---------- a single result: plain row ---------- */
.tx-indexedsearch-res {
    padding: 18px 0;
    border-bottom: 1px solid var(--is-line);
}

/* title */
.tx-indexedsearch-res h3 {
    margin: 0 0 5px;
    font-size: 1.15em;
    line-height: 1.4;
    font-weight: 600;
}
.tx-indexedsearch-title a {
    color: var(--is-brand);
    text-decoration: none;
}
.tx-indexedsearch-title a:hover { color: var(--is-brand-dark); text-decoration: underline; }

/* relevance: quiet, secondary */
.tx-indexedsearch-percent {
    margin-left: 8px;
    font-size: .8em;
    font-weight: 400;
    color: var(--is-muted);
}
.tx-indexedsearch-percent::before { content: "· "; }

/* snippet */
.tx-indexedsearch-description {
    margin: 0 0 6px;
    max-width: 68ch;
    color: var(--is-ink);
    line-height: 1.6;
}
.tx-indexedsearch-redMarkup {
    color: var(--is-ink);
    font-weight: 700;
    background: none;
    padding: 0;
}

/* meta line: keep only the path prominent, dates muted & compact */
.tx-indexedsearch-info {
    margin: 0;
    font-size: .85em;
    color: var(--is-muted);
    line-height: 1.5;
}
.tx-indexedsearch-info dt,
.tx-indexedsearch-info dd {
    display: inline;
    margin: 0;
    font-weight: 400;
}
.tx-indexedsearch-info dd { margin-right: 14px; }
.tx-indexedsearch-info dd p { margin: 0; display: inline; }
.tx-indexedsearch-text-item-path a {
    color: var(--is-brand);
    text-decoration: none;
}
.tx-indexedsearch-text-item-path a:hover { text-decoration: underline; }

/* ---------- pagination ---------- */
.tx-indexedsearch-browsebox { margin-top: 22px; }
.tx-indexedsearch-page-selector {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.tx-indexedsearch-page-selector li { margin: 0; }
.tx-indexedsearch-page-selector li a,
.tx-indexedsearch-page-selector li span {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    padding: 6px 10px;
    color: var(--is-brand);
    text-decoration: none;
    border-radius: 4px;
}
.tx-indexedsearch-page-selector li a:hover { background: #eef4f9; }
.tx-indexedsearch-browselist-current {
    background: var(--is-brand);
    color: #fff;
    font-weight: 600;
}

/* ---------- responsive ---------- */
@media (max-width: 575px) {
    .tx-indexedsearch-search-submit { flex: 1 1 100%; }
    input.tx-indexedsearch-searchbox-button { width: 100%; }
}
