/* Xiehouyu Dictionary — RT-CHN-097
   Widget styling for the 歇後語 (two-part allegorical sayings) dictionary.
   The form shell + ad/section styling come from the platform tool layout;
   this file scopes the xy-* components. TEAL theme (accent #0D9488).
   Loaded automatically by show.blade.php when present. */

.xy-wrap { display: flex; flex-direction: column; gap: 14px; }

.xy-note {
  padding: 10px 14px; background: #f0fdfa; border-left: 3px solid #0D9488;
  border-radius: 0 6px 6px 0; font-size: 12.5px; color: var(--rt-ink-muted); line-height: 1.5;
}

/* Search + controls */
.xy-search-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.xy-search {
  flex: 1; min-width: 180px; padding: 11px 14px; border: 1px solid var(--rt-hairline);
  border-radius: 8px; font-size: 15px; background: #fff;
}
.xy-search:focus { outline: none; border-color: #0D9488; box-shadow: 0 0 0 3px rgba(13,148,136,.12); }
.xy-btn {
  padding: 10px 16px; font-size: 12.5px; border-radius: 8px; cursor: pointer;
  font-family: var(--rt-font-mono); text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
  white-space: nowrap;
}
.xy-btn-random { background: #0D9488; color: #fff; border: 1px solid #0f766e; }
.xy-btn-random:hover { background: #0f766e; }
.xy-btn-clear { background: #fff; color: #0f766e; border: 1px solid rgba(13,148,136,.4); }

.xy-count { font-family: var(--rt-font-mono); font-size: 11.5px; color: var(--rt-ink-muted); letter-spacing: .03em; }

/* Featured / selected entry card */
.xy-entry {
  padding: 18px 20px; background: var(--rt-result-bg); color: var(--rt-result-ink);
  border: 1px solid rgba(13,148,136,.22); border-radius: 12px;
}
.xy-entry-tag {
  font-family: var(--rt-font-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700; color: var(--rt-result-muted); margin-bottom: 10px;
}
.xy-entry-setup {
  font-family: var(--rt-font-sans); font-size: 24px; line-height: 1.35;
  color: var(--rt-result-ink); font-weight: 600;
}
.xy-entry-arrow { color: var(--rt-result-muted); margin: 0 2px; font-weight: 400; }
.xy-reveal-btn {
  margin-top: 12px; padding: 8px 16px; font-size: 13px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.1); color: var(--rt-result-ink);
  border: 1px solid rgba(255,255,255,.28); font-weight: 600;
}
.xy-reveal-btn:hover { background: rgba(255,255,255,.18); }
.xy-entry-punch {
  margin-top: 12px; font-family: var(--rt-font-sans); font-size: 26px; line-height: 1.3;
  color: #5eead4; font-weight: 700;
}
.xy-entry-meaning {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.18);
  font-size: 14.5px; line-height: 1.6; color: var(--rt-result-ink);
}
.xy-entry-gloss { margin-top: 6px; font-size: 13px; color: var(--rt-result-muted); line-height: 1.55; font-style: italic; }

/* Browse list */
.xy-browse { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--rt-hairline); border-radius: 10px; overflow: hidden; }
.xy-browse-head {
  padding: 10px 16px; background: var(--rt-surface-2); border-bottom: 1px solid var(--rt-hairline);
  font-family: var(--rt-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 700; color: var(--rt-ink-muted); display: flex; justify-content: space-between; align-items: center;
}
.xy-list { max-height: 460px; overflow-y: auto; background: #fff; }
.xy-item {
  display: block; width: 100%; text-align: left; padding: 12px 16px; cursor: pointer;
  background: #fff; border: 0; border-bottom: 1px solid var(--rt-hairline); font-family: inherit;
}
.xy-item:last-child { border-bottom: 0; }
.xy-item:hover, .xy-item:focus { background: #f0fdfa; outline: none; }
.xy-item-setup { font-family: var(--rt-font-sans); font-size: 15px; color: var(--rt-ink); font-weight: 600; }
.xy-item-punch { font-size: 13.5px; color: #0f766e; margin-top: 2px; }
.xy-item-mean { font-size: 12px; color: var(--rt-ink-muted); margin-top: 2px; line-height: 1.45; }
.xy-empty { padding: 24px 16px; text-align: center; color: var(--rt-ink-muted); font-style: italic; }

@media (max-width: 480px) {
  .xy-entry-setup { font-size: 20px; }
  .xy-entry-punch { font-size: 22px; }
  .xy-search-row { flex-direction: column; }
  .xy-btn { width: 100%; }
}
