/*
Theme Name: Where Do Kids Eat Free Today
Theme URI: https://wheredokidseatfreetoday.com
Author: Where Do Kids Eat Free Today
Description: A plain, fast directory theme for kids-eat-free restaurant deals, with per-country and per-day pages.
Version: 2.0.0
Requires at least: 5.3
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wheredokidseatfreetoday
*/

:root {
  --bg: #f6f7f5;
  --card: #ffffff;
  --ink: #1b211d;
  --mute: #5a645e;
  --line: #dde2de;
  --acc: #0f6b4a;
  --acc-ink: #ffffff;
  --acc-soft: #e3f1ea;
  --soon-bg: #fff1c9;
  --soon-ink: #6b4400;
  --warn: #8a4b00;
  --focus: #1d6fe0;
  --radius: 8px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111513;
    --card: #181e1b;
    --ink: #e8ede9;
    --mute: #9aa7a0;
    --line: #29322d;
    --acc: #5bcb9c;
    --acc-ink: #06261a;
    --acc-soft: #1b2b24;
    --soon-bg: #3a2f10;
    --soon-ink: #f3d27a;
    --warn: #e9b866;
    --focus: #7ab2ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acc); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 8px; padding-bottom: 24px; min-height: 60vh; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Type */
h1, h2 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.7rem, 4.5vw + .6rem, 2.3rem); font-weight: 750; margin: 1.9rem 0 .6rem; }
h2 { font-size: 1.15rem; font-weight: 650; margin: 0; }
h2.sec { font-size: 1.25rem; margin: 2.2rem 0 .8rem; }
.lead { font-size: 1.05rem; color: var(--mute); margin: 0 0 1.3rem; max-width: 60ch; }
.crumb { margin: 1.4rem 0 -.8rem; font-size: .95rem; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.count { color: var(--mute); font-size: .92rem; margin: 1.2rem 0 .2rem; }
.empty { color: var(--mute); padding: 1rem 0 .4rem; }

/* Header */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 750; font-size: 1.02rem; color: var(--ink); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-left: -10px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 6px 10px; border-radius: 6px; }
.top nav a:hover { background: var(--acc-soft); }
.top nav a[aria-current="page"] { color: var(--acc); background: var(--acc-soft); }

/* Country picker */
.pick { display: grid; gap: 10px; margin: 1.2rem 0 .4rem; grid-template-columns: repeat(3, 1fr); }
.pick a { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: 1.1rem; font-weight: 650; transition: border-color .12s, background .12s; }
.pick a:hover { border-color: var(--acc); background: var(--acc-soft); }
.pick small { font-size: .88rem; font-weight: 450; color: var(--mute); }
.pick small::before { content: "Today: "; }

/* Day tabs */
.days { display: flex; flex-wrap: wrap; gap: 6px; margin: 1rem 0 1.1rem; }
.days a { padding: 6px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 500; }
.days a:hover { border-color: var(--acc); }
.days a.today { border-color: var(--acc); color: var(--acc); font-weight: 650; }
.days a.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }

/* Deal card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 12px 0; }
.card.ended { opacity: .8; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; }
.card h2 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover { color: var(--acc); text-decoration: underline; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .78rem; font-weight: 650; line-height: 1.5; padding: 1px 9px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); white-space: nowrap; }
.tag.soon { background: var(--soon-bg); color: var(--soon-ink); }
.tag.warn { background: transparent; color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.tag.ended { background: transparent; color: var(--mute); box-shadow: inset 0 0 0 1px var(--line); }
.deal { font-size: 1.02rem; font-weight: 600; margin: .55rem 0 .2rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: .8rem 0; font-size: .95rem; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.chk { font-size: .87rem; color: var(--mute); margin: .8rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); }
.chk.warn strong { color: var(--warn); }

/* Buttons and links */
.btn { display: inline-block; padding: 10px 18px; background: var(--acc); color: var(--acc-ink); border-radius: 6px; font-weight: 650; font-size: .96rem; text-decoration: none; border: 1px solid var(--acc); }
.btn:hover { filter: brightness(1.08); }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.alt:hover { border-color: var(--ink); filter: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 1.1rem 0; }

/* Content */
.notes { margin: 1.5rem 0; max-width: 65ch; }
.notes > :first-child { margin-top: 0; }
.plain { list-style: none; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.legend { font-size: .9rem; color: var(--mute); margin: 2rem 0 0; }
.legend summary { cursor: pointer; }
.legend p { margin: .6rem 0 0; max-width: 65ch; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--card); padding: 1.3rem 0 2rem; font-size: .9rem; color: var(--mute); }
.foot ul { list-style: none; margin: 0 0 .7rem; padding: 0; display: flex; gap: 6px 18px; flex-wrap: wrap; }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--ink); }
.foot p { margin: 0; }

/* WordPress core alignment helpers */
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--mute); }
.screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.pagination .nav-links { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .pick { grid-template-columns: 1fr; }
  .pick a { flex-direction: row; justify-content: space-between; align-items: baseline; }
  .card { padding: 16px; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { font-size: .8rem; margin-top: 8px; }
  .top .wrap { flex-direction: column; align-items: flex-start; }
  .top nav { margin-left: -10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .top, .foot, .days, .actions, .skip { display: none; } body { background: #fff; color: #000; } .card { border-color: #999; } }
