/* views.css — per-view layout glue. Sections added per task. */

/* ============== FOOTER ============== */
.ws-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  margin-top: 3rem;
  border-top: 1px solid var(--ws-line);
  gap: 1rem;
}
.ws-footer__col { display: flex; gap: 1rem; align-items: center; }
.ws-footer__col--end { justify-content: flex-end; }
.ws-footer__link {
  color: var(--ws-muted);
  text-decoration: none;
  font-family: var(--ws-sans);
  font-size: var(--ws-ui-sm);
}
.ws-footer__link:hover { color: var(--ws-terracotta); }
.ws-footer__brand { color: var(--ws-terracotta); text-decoration: none; }
.ws-footer__brand:hover { color: #8a4530; }
[data-bs-theme="dark"] .ws-footer__brand:hover { color: #f0a890; }

/* Navbar dropdown menu — Bootstrap dropdown styling adapter */
.ws-navbar .dropdown-menu {
  background: var(--bs-body-bg);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius-card);
  font-family: var(--ws-sans);
  font-size: var(--ws-ui);
}
.ws-navbar .dropdown-item { color: var(--ws-ink); }
.ws-navbar .dropdown-item:hover { background: var(--ws-cream); color: var(--ws-terracotta); }
[data-bs-theme="dark"] .ws-navbar .dropdown-item:hover { background: var(--ws-wheat); }
.ws-navbar .logout-button {
  text-decoration: none;
  text-transform: none;
  text-align: left;
  padding: 0;
  color: var(--ws-muted);
  background: none;
  border: none;
}
.ws-navbar .logout-button:hover { color: var(--ws-terracotta); }

/* ============== LIST PAGE ============== */
.ws-list-page { padding: 1.5rem 0; }
.ws-list-page__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem 0.75rem 1.25rem;
}
.ws-list-page__head h1 { flex: 1; }
.ws-view-toggle {
  display: flex;
  border: 1px solid var(--ws-line-dotted);
}
.ws-view-toggle__btn {
  padding: 0.4rem 0.65rem;
  font-family: var(--ws-sans);
  font-size: var(--ws-ui-sm);
  background: transparent;
  border: none;
  color: var(--ws-muted);
  cursor: pointer;
}
.ws-view-toggle__btn:hover { color: var(--ws-ink); }
.ws-view-toggle__btn.is-active {
  background: var(--ws-ink);
  color: var(--ws-cream);
}
.ws-list-page__filters {
  padding: 0 1.25rem 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ws-list-page__count {
  margin-left: auto;
  font-family: var(--ws-sans);
  font-size: var(--ws-ui-sm);
  color: var(--ws-muted);
}
.ws-list-page .ws-rcard-grid { padding: 0 1.25rem; }

/* ============== RECIPE DETAIL ============== */
.ws-detail-page { padding: 1.5rem 0; }
.ws-detail__head { padding: 0 1.25rem 0.5rem 1.25rem; }
.ws-detail__actions {
  float: right;
  display: flex;
  gap: 0.65rem;
  color: var(--ws-muted);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}
.ws-detail__actions a { color: var(--ws-muted); cursor: pointer; text-decoration: none; }
.ws-detail__actions a:hover { color: var(--ws-ink); }
.ws-detail__actions a.is-danger:hover { color: #c44d3a; }
.ws-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.ws-detail__meta img { height: 14px; width: auto; }
.ws-detail__tags {
  padding: 0.65rem 1.25rem;
  background: var(--ws-cream);
  border-top: 1px solid var(--ws-line);
  border-bottom: 1px solid var(--ws-line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
[data-bs-theme="dark"] .ws-detail__tags { background: var(--ws-wheat); }
.ws-detail__tags-edit {
  margin-left: auto;
  font-family: var(--ws-sans);
  font-size: var(--ws-ui-sm);
  color: var(--ws-terracotta);
  text-decoration: none;
}
.ws-detail__tags-edit:hover { color: #8a4530; }
.ws-detail__info {
  border-left: 3px solid var(--ws-terracotta);
  padding: 0.75rem 1rem;
  margin: 1rem 1.25rem;
  font-family: var(--ws-serif-body);
  font-style: italic;
  color: var(--ws-muted);
}
.ws-detail__hero {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
  background: var(--ws-wheat-soft);
}
.ws-detail__hero img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}
.ws-detail__tab-content { padding: 1.25rem 1.25rem 0 1.25rem; }
.ws-detail__prose {
  font-family: var(--ws-serif-body);
  font-size: var(--ws-body);
  color: var(--ws-ink);
  line-height: 1.65;
  max-width: 70ch;
}
.ws-detail__prose h1, .ws-detail__prose h2, .ws-detail__prose h3 { font-family: var(--ws-serif-display); }
.ws-detail__ingredients ul,
.ws-detail__ingredients ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ============== SEARCH PAGE ============== */
.ws-search-page { padding: 1.5rem 0; }
.ws-search-page__head { padding: 0 1.25rem 1rem 1.25rem; }
.ws-search-page__q {
  color: var(--ws-terracotta);
  font-style: italic;
  font-weight: 400;
}
.ws-search-page__section {
  padding: 0.85rem 1.25rem 0.35rem 1.25rem;
  background: var(--ws-cream);
  border-top: 1px solid var(--ws-line);
  border-bottom: 1px solid var(--ws-line);
}
[data-bs-theme="dark"] .ws-search-page__section { background: var(--ws-wheat); }

/* ============== INDEX (logged-in) ============== */
.ws-index-page { padding: 1.5rem 0; }
.ws-index-page__greeting {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--ws-cream);
  border-bottom: 1px solid var(--ws-line);
  flex-wrap: wrap;
}
[data-bs-theme="dark"] .ws-index-page__greeting { background: var(--ws-wheat); }
.ws-index-page__quick { display: flex; gap: 0.55rem; flex-shrink: 0; }
.ws-index-page__section { padding: 1.5rem 1.25rem 0.5rem 1.25rem; }
.ws-index-page__section .ws-rcard-grid { margin-top: 0.85rem; }
.ws-index-page__stats {
  display: flex;
  gap: 2.5rem;
  padding: 1.5rem 1.25rem;
  margin-top: 1rem;
  background: var(--ws-cream);
  border-top: 1px solid var(--ws-line);
  flex-wrap: wrap;
}
[data-bs-theme="dark"] .ws-index-page__stats { background: var(--ws-wheat); }
.ws-stat {
  display: block;
  text-decoration: none;
  color: inherit;
}
.ws-stat:hover { color: var(--ws-terracotta); }
.ws-stat__num {
  display: block;
  font-family: var(--ws-serif-display);
  font-size: 1.85rem;
  color: var(--ws-ink);
  line-height: 1;
}
.ws-stat:hover .ws-stat__num { color: var(--ws-terracotta); }
.ws-stat__label {
  display: block;
  font-family: var(--ws-sans);
  font-size: var(--ws-label-cap);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ws-muted);
  margin-top: 0.25rem;
}

/* ============== HOME (logged-out) ============== */
.ws-home { padding: 1rem 0 0 0; }
.ws-home__hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem 1.5rem;
}
.ws-home__mark {
  color: var(--ws-terracotta);
  margin-bottom: 1.5rem;
}
.ws-home__tag {
  font-family: var(--ws-serif-body);
  font-size: 1.05rem;
  color: var(--ws-muted);
  font-style: italic;
  margin: 0.5rem 0 1.75rem 0;
}
.ws-home__cta { display: inline-flex; gap: 0.65rem; flex-wrap: wrap; justify-content: center; }
.ws-home__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--ws-line);
  background: var(--ws-cream);
}
[data-bs-theme="dark"] .ws-home__features { background: var(--ws-wheat); }
@media (max-width: 800px) {
  .ws-home__features { grid-template-columns: 1fr; gap: 1.25rem; }
  .ws-home__hero { padding: 3rem 1rem 2rem 1rem; }
}
.ws-home__feat { padding: 1rem; }
.ws-home__feat-glyph {
  color: var(--ws-terracotta);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

/* ============== MODAL SHELL ADAPTER (Bootstrap modal -> ws-modal) ============== */
.modal-content-add,
.modal-content-recipe-share,
.modal-content-recipe-report,
.modal-content-food-type,
.modal-content {
  background: var(--bs-body-bg);
  border-radius: 6px;
  border: 1px solid var(--ws-line);
  box-shadow: 0 20px 60px rgba(40, 24, 16, 0.15);
}

/* ============== FORM PAGE (create) ============== */
.ws-form-page {
  padding: 1.5rem 1.25rem 3rem 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}
.ws-form-page__form { margin-top: 1.5rem; }
.ws-form-page__section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ws-line);
}
.ws-form-page__section:last-of-type { border-bottom: none; }
.ws-form-page__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  padding-top: 1rem;
}
/* Inputs/selects rendered by Django via {{ field }} need the editorial input style */
.ws-form-page input[type="text"],
.ws-form-page input[type="url"],
.ws-form-page input[type="email"],
.ws-form-page input[type="password"],
.ws-form-page select,
.ws-modal__body input[type="text"],
.ws-modal__body input[type="url"],
.ws-modal__body input[type="email"] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ws-ink);
  border-radius: 0;
  padding: 0.4rem 0;
  font-family: var(--ws-serif-body);
  font-size: var(--ws-body);
  color: var(--ws-ink);
  width: 100%;
  outline: none;
}
.ws-form-page input:focus,
.ws-form-page select:focus,
.ws-modal__body input:focus { border-bottom-color: var(--ws-terracotta); }
.ws-form-page textarea,
.ws-modal__body textarea {
  background: var(--ws-cream);
  border: 1px solid var(--ws-line);
  border-radius: var(--ws-radius-card);
  padding: 0.65rem 0.85rem;
  font-family: var(--ws-serif-body);
  font-size: 0.95rem;
  color: var(--ws-ink);
  width: 100%;
  min-height: 80px;
  outline: none;
}
[data-bs-theme="dark"] .ws-form-page textarea,
[data-bs-theme="dark"] .ws-modal__body textarea { background: var(--ws-wheat); }
