/* Chinese Poetry Line Search — RT-CHN-100
   Widget styling. The form shell + ad/section styling come from the platform
   tool layout; this file scopes the po-* result components. INK/slate cultural
   theme (accent #334155). Loaded automatically by show.blade.php when present. */

.po-form { display: flex; flex-direction: column; gap: 12px; }

.po-searchrow { display: flex; gap: 8px; flex-wrap: wrap; }
.po-search {
  flex: 1; min-width: 220px; padding: 12px 14px; border: 1px solid var(--rt-hairline);
  border-radius: 8px; font-size: 16px; background: #fff;
}
.po-search:focus { outline: none; border-color: #334155; box-shadow: 0 0 0 3px rgba(51,65,85,.12); }

.po-btn {
  padding: 11px 18px; font-size: 13px; border-radius: 8px; cursor: pointer;
  font-family: var(--rt-font-mono); text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.po-btn-go { background: #334155; color: #fff; border: 1px solid #1e293b; }
.po-btn-go:hover { background: #1e293b; }
.po-btn-clear { background: #fff; color: #334155; border: 1px solid rgba(51,65,85,.4); }

.po-hint { font-size: 12.5px; color: var(--rt-ink-muted); line-height: 1.5; }

/* Results */
.po-results { margin-top: 4px; }
.po-empty { padding: 18px; text-align: center; color: var(--rt-ink-muted); font-style: italic; }

.po-count {
  font-family: var(--rt-font-mono); font-size: 12.5px; color: var(--rt-ink-muted);
  text-transform: uppercase; letter-spacing: .03em; font-weight: 600;
  padding: 8px 2px 12px; border-bottom: 1px solid var(--rt-hairline); margin-bottom: 14px;
}
.po-count-featured { color: #334155; }
.po-capped { color: var(--rt-ink-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }

.po-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .po-cards { grid-template-columns: 1fr; } }

.po-card {
  padding: 16px 18px; background: #fff; border: 1px solid var(--rt-hairline);
  border-left: 4px solid #334155; border-radius: 10px; display: flex; flex-direction: column; gap: 10px;
}

.po-card-head { display: flex; flex-direction: column; gap: 4px; }
.po-title {
  font-family: var(--rt-font-serif, var(--rt-font-sans)); font-size: 19px; line-height: 1.3;
  margin: 0; color: var(--rt-ink, #1a1814); font-weight: 700;
}
.po-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.po-author { font-size: 14px; color: var(--rt-ink); font-weight: 600; }
.po-dynasty {
  font-family: var(--rt-font-mono); font-size: 11px; color: #334155; background: #E2E8F0;
  border: 1px solid rgba(51,65,85,.22); border-radius: 999px; padding: 2px 9px; letter-spacing: .02em;
}

.po-poem {
  display: flex; flex-direction: column; gap: 4px; padding-top: 8px;
  border-top: 1px dashed rgba(0,0,0,.08);
}
.po-line {
  font-family: var(--rt-font-serif, var(--rt-font-sans)); font-size: 16.5px; line-height: 1.7;
  color: var(--rt-ink, #1a1814); letter-spacing: .01em;
}

/* Matched-substring highlight */
.po-hl {
  background: #FDE68A; color: #1e293b; border-radius: 3px; padding: 0 1px;
  font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
