/* search page */

/* Shimmer uses border tokens so it adapts to every palette automatically */

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* Base skeleton line — shimmer gradient scrolls horizontally */
.sk-line {
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--line)        25%,
    var(--line-strong) 50%,
    var(--line)        75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

/* Skeleton line sizes matching real post-item content */
.sk-date      { height: 11px; width: 72px; }
.sk-title     { height: 17px; width: 68%; margin-top: 6px; }
.sk-summary-a { height: 11px; width: 92%; margin-top: 10px; }
.sk-summary-b { height: 11px; width: 58%; margin-top: 5px; }
.sk-tag       { height: 20px; width: 52px; margin-top: 2px; }

/* Cascade shimmer phase across cards so they don't pulse in lock-step */
.sk-card:nth-child(2) .sk-line { animation-delay: 0.15s; }
.sk-card:nth-child(3) .sk-line { animation-delay: 0.30s; }
.sk-card:nth-child(4) .sk-line { animation-delay: 0.45s; }

/* Disable hover styles on skeleton cards */
.sk-card { pointer-events: none; }
.sk-card:hover { transform: none !important; }

@keyframes searchItemIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.post-item.search-enter {
  animation: searchItemIn 0.3s ease both;
}
@media (prefers-reduced-motion: reduce) {
  .post-item.search-enter { animation: none; }
}


.search-box {
  display: flex;
  align-items: center;
  border: 1px dashed var(--line-strong);
  padding: 10px 14px;
  margin: 24px 0 0;
  gap: 10px;
  transition: border-color .15s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box::before { content: "$"; color: var(--accent); flex-shrink: 0; }
#search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  caret-color: var(--accent);
}
#search::placeholder { color: var(--dim); opacity: 0.7; }
.search-results { padding-top: 8px; min-height: 240px; }
.search-results-list { padding-top: 0; border-top: none; }
.search-meta { color: var(--dim); font-size: 12px; padding: 16px 0 0; }
.search-empty { color: var(--dim); padding: 32px 0; }
