/* WordPress-specific additions for the Harvest Table theme */

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto; clip-path: none; color: #000; display: block;
  height: auto; left: 5px; top: 5px; padding: 12px 20px; width: auto; z-index: 100000;
}

/* Menus */
.nav-list, .meal-list, .footer-links {
  list-style: none; margin: 0; padding: 0;
}
.nav-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: center; }
.meal-list { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.meal-nav-inner .meal-list { width: 100%; }
.footer-links { display: block; }
.footer-links li { margin-bottom: 0.35rem; }
.site-nav { align-items: center; }
.meal-list .current-menu-item > a,
.meal-list .current-menu-ancestor > a { background: var(--sage-soft); border-color: #86efac; color: var(--sage); }

/* Search */
.search-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-elevated);
  color: var(--text); cursor: pointer;
}
.search-toggle:hover { border-color: var(--accent); color: var(--accent); }
.header-search { background: var(--bg-muted); border-top: 1px solid var(--line); padding: 0.75rem 0; }
.search-form { display: flex; gap: 0.5rem; flex-wrap: wrap; max-width: 36rem; }
.search-field {
  flex: 1 1 14rem; min-width: 0;
  font: inherit; font-size: 1rem; padding: 0.7rem 1rem;
  border: 2px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--text);
}
.search-field:focus { outline: 3px solid rgba(180, 83, 9, 0.35); border-color: var(--accent); }
.hero-search { margin: 1.25rem 0 0; }

/* Pagination */
.pagination { margin: 2.5rem 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers {
  padding: 0.5rem 1rem; border-radius: 999px; background: var(--bg-elevated);
  border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--text);
}
.pagination .page-numbers.current, .pagination .page-numbers:hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

/* Recipe */
.recipe-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin: 1rem 0 0.5rem;
}
.recipe-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.recipe-nav {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin: 2rem 0 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
}
.recipe-nav a { font-weight: 700; text-decoration: none; }
.recipe-notes { margin: 1.5rem 0; }
.recipe-grid-wide { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.blog-sidebar .count { color: var(--muted); font-weight: 500; }
.blog-sidebar .search-form { max-width: none; }
.blog-sidebar .search-form .btn { width: 100%; }

/* Mosaic as links */
a.mosaic-cell { position: relative; display: block; text-decoration: none; }
.mosaic-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem 0.85rem 0.6rem;
  color: #fff; font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0; transition: opacity 0.2s;
}
a.mosaic-cell:hover .mosaic-caption, a.mosaic-cell:focus .mosaic-caption { opacity: 1; }
.mosaic-cell img { transition: transform 0.4s; }
a.mosaic-cell:hover img { transform: scale(1.05); }

/* Content from editor */
.entry-content > * + * { margin-top: 1rem; }
.entry-content h2 { margin-top: 2rem; }
.entry-content img, .entry-featured { border-radius: var(--radius); }
.entry-featured { width: 100%; margin-bottom: 1.5rem; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 0.9rem; color: var(--muted); }
.footer-contact { margin: 0; font-size: 0.95rem; line-height: 1.6; }
.footer-contact a { color: inherit; }

/* Recipe extras */
.recipe-byline { color: var(--muted); font-size: 0.95rem; margin: 0.25rem 0 1rem; }
.recipe-intro { font-size: 1.1rem; line-height: 1.75; max-width: 46rem; }
.recipe-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.recipe-extra h2 { font-size: 1.3rem; margin: 0 0 0.5rem; }
.recipe-disclaimer {
  font-size: 0.9rem; color: var(--muted); background: var(--bg-muted);
  border-left: 4px solid var(--line); padding: 0.85rem 1rem; border-radius: 0 var(--radius) var(--radius) 0;
}

/* Contact form & notices */
.contact-form-live { max-width: 38rem; }
.contact-form-live label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.contact-form-live input, .contact-form-live select, .contact-form-live textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: 0.7rem 0.9rem;
  border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text);
}
.contact-form-live input:focus, .contact-form-live select:focus, .contact-form-live textarea:focus {
  outline: 3px solid rgba(180, 83, 9, 0.35); border-color: var(--accent);
}
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-notice { padding: 0.9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 600; }
.form-notice-ok { background: var(--sage-soft); color: #14532d; border: 1px solid #86efac; }
.form-notice-err { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
address.footer-contact { font-style: normal; }
.cookie-learn { color: #fde68a; align-self: center; font-weight: 700; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.legal th, .legal td { border: 1px solid var(--line); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.legal th { background: var(--bg-muted); }
.legal .toc { background: var(--bg-muted); border-radius: var(--radius); padding: 1rem 1.25rem; }
.legal .toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; columns: 2; }
.legal .callout { background: var(--sage-soft); border-left: 4px solid var(--sage); padding: 0.9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; }

@media (max-width: 900px) {
  .recipe-extra { grid-template-columns: 1fr; }
  .legal .toc ol { columns: 1; }
}

@media (max-width: 640px) {
  .nav-list { flex-direction: column; align-items: flex-start; width: 100%; }
  .search-toggle { align-self: flex-start; }
}

@media print {
  .site-header, .site-footer, .cookie-consent, .recipe-actions, .recipe-nav,
  .section-muted, .skip-link { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .recipe-hero-img-wrap { max-height: 200px; overflow: hidden; }
  body { font-size: 12pt; background: #fff; }
}
