/* Writing Filing Cabinet -- Search page (Story 2379).
   Pinned chrome: the injected Leonardo Main Menu Tool Bar Strip, the header,
   and the controls never scroll off. Shell height is 100dvh (with a 100vh
   fallback first) because on a phone 100vh is the URL-bar-expanded height and a
   100vh shell scrolls the toolbar away. Exactly one child (.ws-list) scrolls. */

.ws-shell {
    display: flex; flex-direction: column;
    height: 100vh; height: 100dvh;
    overflow: hidden;
    background: #F4F4F4;
}

#lwIconBand, .ct-header, .ws-controls, .ws-status { flex: 0 0 auto; }
.ws-list { flex: 1; overflow: auto; padding: 10px 12px 24px; }

/* ---- header (shared .ct-header convention) ---- */
.ct-header {
    background: #3C3C3C; color: #fff;
    padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
}
.ct-header h1 { margin: 0; font-size: 14pt; font-weight: 600; flex: 1; }
.ct-header button {
    background: transparent; color: #fff;
    border: 1px solid #6A6A6A; border-radius: 3px;
    padding: 5px 12px; cursor: pointer; font: inherit;
}
.ct-header button:hover { background: #5A5A5A; }

/* ---- controls ---- */
.ws-controls {
    background: #fff;
    border-bottom: 1px solid #DADADA;
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 8px;
}

/* An input alone on its row spans the full width and lines up with the content
   on both sides (Web Pages checklist). */
.ws-searchrow { display: flex; }
.ws-query {
    flex: 1 1 100%; width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 13pt;
    border: 1px solid #BFBFBF; border-radius: 5px;
}
.ws-query:focus { outline: none; border-color: #3C7DD9; box-shadow: 0 0 0 2px rgba(60,125,217,0.2); }

.ws-optionsrow {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.ws-toggle {
    background: #EFEFEF; color: #333;
    border: 1px solid #C6C6C6; border-radius: 14px;
    padding: 5px 13px; cursor: pointer; font: inherit; font-size: 10pt;
}
.ws-toggle.on { background: #3C7DD9; color: #fff; border-color: #3060B0; }
.ws-sortlabel { margin-left: auto; color: #666; font-size: 10pt; }
.ws-sort { flex: 0 0 auto; min-width: 150px; }

.ws-hint { color: #888; font-size: 9pt; }

/* ---- results ---- */
.ws-empty { color: #888; text-align: center; padding: 40px 12px; }

.ws-card {
    background: #fff;
    border: 1px solid #E2E2E2; border-radius: 7px;
    padding: 11px 13px; margin-bottom: 9px;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
}
.ws-card:hover { border-color: #3C7DD9; box-shadow: 0 1px 5px rgba(0,0,0,0.09); }

.ws-card-head { display: flex; align-items: baseline; gap: 8px; }
.ws-card-title { font-size: 12.5pt; font-weight: 600; color: #1B1B1B; flex: 1; }
.ws-card-star { color: #E7A419; font-size: 12pt; flex: 0 0 auto; }
.ws-card-badge {
    flex: 0 0 auto;
    background: #EDF3FC; color: #2E5FA8;
    border: 1px solid #CFE0F6; border-radius: 3px;
    padding: 1px 7px; font-size: 8.5pt; font-weight: 600;
    text-transform: uppercase; letter-spacing: .03em;
}

.ws-card-meta { color: #777; font-size: 9.5pt; margin-top: 3px; }
.ws-card-snippet {
    color: #444; font-size: 10.5pt; line-height: 1.45;
    margin-top: 7px;
    white-space: pre-wrap; word-break: break-word;
}
.ws-card-snippet mark { background: #FFF1A8; color: inherit; padding: 0 1px; border-radius: 2px; }

/* ---- status ---- */
.ws-status {
    background: #ECECEC; border-top: 1px solid #D8D8D8;
    color: #666; font-size: 9.5pt;
    padding: 6px 14px;
    min-height: 15px;
}
