/* =========================
   Semantic Page Overrides
   ========================= */

/* =========================
   Semantic Layout Skeleton
   ========================= */

/* -------------------------
   Primary area (left)
   ------------------------- */

.semantic-primary {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.semantic-display .haiku-lines p {
  font-family: 'Dancing Script', 'Satisfy', cursive;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: #2f2f2f;

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.semantic-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.control-status {
  text-align: center;
  white-space: nowrap;
}

/* -------------------------
   Results column (middle)
   ------------------------- */

.semantic-results {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* -------------------------
   Filters column (right)
   ------------------------- */

.semantic-filters {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.filter-input {
  /* search input placeholder */
}

.filter-controls {
  margin-top: auto;
}

.results-controls {
  margin-top: auto;
}

/* =========================================================
   Semantic Haiku Display
   ========================================================= */

.semantic-display {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 3rem 2.5rem;
  min-height: 200px;

  text-align: center;

}

/* =========================================================
   Semantic panels, width, and scrolling
   ========================================================= */

/* Haiku reading width */
.semantic-display > * {
  max-width: 60rem;
  margin: 0 auto;
}

/* Panel boundaries (hairline) */
.semantic-primary,
.semantic-results,
.semantic-filters {
  border: 3px solid rgba(0, 0, 0, 0.08);
}

/* Subtle separation between filter sections */
.semantic-filters > * + * {
  margin-top: 0.75rem;
}

/* Make list items feel clickable without being loud */
.results-files .result-row,
.filter-tags .tag-item {
  cursor: pointer;
  padding: 0.15rem 0;
}

.results-files .result-row:hover,
.filter-tags .tag-item:hover {
  text-decoration: underline;
}

/* === Semantic 3-panel layout === */

.semantic-main {
  display: grid;
  grid-template-columns: 60% 20% 20%;
  gap: 12px;
}

.semantic-main {
  width: min(1200px, 92vw);
  height: 34rem;
}

/* Ensure equal height panels */
.semantic-primary,
.semantic-results,
.semantic-filters {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Constrain scrollable panels to container */
.semantic-results,
.semantic-filters {
  overflow: hidden;
}

/* Scroll only the content areas */
.semantic-display {
  flex: 1;
}

.results-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.results-files {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.filter-list {
  flex: 1;
  min-height: 0;

  display: flex;
  flex-direction: column;
}

.filter-pairs {
  flex: 1;
  min-height: 0;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-tags,
.filter-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.filter-results {
  display: none;
}

.filter-tags {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 0.5rem;
}

main.explore,
.semantic-layout {
  max-width: none;
  width: 100%;
}

/* =========================================================
   Semantic Explore – understated About-style links + scrolling
   ========================================================= */

.semantic-layout .results-files a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(47, 62, 70, 0.25);
  font-weight: 400;
}

.semantic-layout .results-files a:hover {
  border-bottom-color: rgba(47, 62, 70, 0.45);
}

/* Visible but quiet scrollbar */
.semantic-layout .results-files::-webkit-scrollbar {
  width: 8px;
}

.semantic-layout .results-files::-webkit-scrollbar-track {
  background: transparent;
}

.semantic-layout .results-files::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

.semantic-layout .filter-tags::-webkit-scrollbar {
  width: 8px;
}

.semantic-layout .filter-tags::-webkit-scrollbar-track {
  background: transparent;
}

.semantic-layout .filter-tags::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}

/* Hide tag footer inside haiku display (semantic explore only) */
.semantic-display .haiku-tags {
  display: none;
}

/* =========================
   Semantic Controls – Buttons
   ========================= */

.semantic-controls button,
.filter-controls button {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.25);
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.semantic-controls button:hover,
.filter-controls button:hover {
  background: rgba(0, 0, 0, 0.04);
}

.semantic-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* =========================================================
   Tag Styling Overrides (Semantic Explore)
   ========================================================= */

.semantic-layout .filter-tags {
  padding-top: 0.25rem;
}

/* Tag rows */
.semantic-layout .filter-tags .tag-item {
  display: block;
  padding: 0.35rem 0.4rem;
  line-height: 1.35;
  border-radius: 4px;

  color: var(--ink);
  text-decoration: none;
}

/* Hover affordance (quiet) */
.semantic-layout .filter-tags .tag-item:hover {
  background: rgba(0, 0, 0, 0.04);
  text-decoration: none; /* override earlier underline */
}

/* Active / selected state (ONLY if JS already applies .active) */
.semantic-layout .filter-tags .tag-item.active {
  background: rgba(0, 0, 0, 0.07);
  font-weight: 500;
}

/* =========================================================
   Button Styling Overrides (Semantic Explore)
   ========================================================= */

.semantic-layout .semantic-controls button,
.semantic-layout .filter-controls button {
  border-radius: 6px;
  line-height: 1.2;

  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

/* Hover */
.semantic-layout .semantic-controls button:hover,
.semantic-layout .filter-controls button:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.35);
}

/* Active / pressed */
.semantic-layout .semantic-controls button:active,
.semantic-layout .filter-controls button:active {
  background: rgba(0, 0, 0, 0.08);
}

/* Disabled */
.semantic-layout .semantic-controls button:disabled,
.semantic-layout .filter-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

