/* ==========================================================================
   entries.css: the database UI (filters + expandable grad cards).
   Used by the homepage preview and the full database page.
   ========================================================================== */

/* fake browser window around the homepage preview */
.browser { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #fbfbfc; border-bottom: 1px solid var(--line-2); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.browser-bar i:nth-child(1) { background: #ec6a5e; }
.browser-bar i:nth-child(2) { background: #f4bf4f; }
.browser-bar i:nth-child(3) { background: #61c554; }
.browser-tab { margin-left: 10px; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }
.browser-body { padding: 18px; }

/* ---------- filters ---------- */
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.filter label { display: block; font-size: 12px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.filter select, .filter input {
  width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 0 10px; font-size: 13px; color: var(--text);
}
.filters .btn { height: 36px; padding: 0 22px; border-radius: 8px; font-size: 14px; min-width: 120px; }
@media (max-width: 1080px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- cards ---------- */
.entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.entry { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 13px 13px 11px; }
.entry.open { border: 1.5px solid var(--navy); }
.entry-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.entry h3 { font-size: 13.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.005em; }
.entry-sub { font-size: 11.5px; color: var(--muted); margin: 3px 0 8px; }
.entry-path { display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--navy); background: var(--bg-soft); border-radius: 8px; padding: 4px 8px; line-height: 1.45; }
.entry-toggle {
  background: none; border: 0; padding: 2px; cursor: pointer; color: var(--navy); flex: none; border-radius: 6px;
}
.entry-toggle svg { transition: transform .15s; }
.entry.open .entry-toggle svg { transform: rotate(180deg); }
.entry-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--green); background: none; border: 0; padding: 0; cursor: pointer; }
.entry.open .entry-more { display: none; }
.entry-details { display: none; margin: 12px 0 0; padding: 0; }
.entry.open .entry-details { display: block; }
.entry-details div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 11.5px; }
.entry-details dt { color: var(--muted); }
.entry-details dd { margin: 0; font-weight: 700; color: var(--navy); text-align: right; }
.entry .tag-example { font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #9a6b12; background: #fff4df; border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px; }

/* bottom row of the homepage preview fades out */
.entries.fade {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), rgba(0,0,0,.18));
          mask-image: linear-gradient(to bottom, #000 calc(100% - 90px), rgba(0,0,0,.18));
}
.preview-status { margin: 12px 2px 0; }

.entries-empty { grid-column: 1 / -1; text-align: center; padding: 36px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }
.entries-status { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

@media (max-width: 960px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .btn { grid-column: 1 / -1; }
  .entries { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .entries { grid-template-columns: 1fr; }
}
