/* Web bin day lookup (assets/js/lookup.js). Self-contained so the widget can use it without styles.css. */
.bl {
  --bl-green: #4E6B3C; --bl-green-dark: #2F4020; --bl-soft: #D3E7BD; --bl-text: #1a1a1a; --bl-muted: #5a5a5a;
  --bl-bg: #fff; --bl-field: #fff; --bl-border: #cfcfc8; --bl-card: #fafaf7; --bl-err-bg: #fdecea; --bl-err: #8a1c12;
  background: var(--bl-bg); color: var(--bl-text); border-radius: 6px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.5; text-align: left; min-height: 150px;
}
[data-theme="dark"] .bl {
  --bl-green: #9CC27F; --bl-green-dark: #D3E7BD; --bl-soft: #2b3a22; --bl-text: #ececec; --bl-muted: #b0b0b0;
  --bl-bg: #1c1f1a; --bl-field: #262a24; --bl-border: #454a42; --bl-card: #23271f; --bl-err-bg: #3a1d1a; --bl-err: #ffb4a8;
}
.bl * { box-sizing: border-box; }
.bl a { color: var(--bl-green); }
.bl-title { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 1.25rem; margin: 0 0 12px; color: var(--bl-text); }
.bl-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.bl-field { flex: 1 1 150px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bl-field label { font-size: 0.85rem; font-weight: 600; color: var(--bl-muted); }
.bl-field input {
  width: 100%; height: 48px; padding: 0 12px; font: inherit; font-size: 1rem; color: var(--bl-text);
  background: var(--bl-field); border: 1.5px solid var(--bl-border); border-radius: 8px;
}
.bl-field input:focus { outline: none; border-color: var(--bl-green); box-shadow: 0 0 0 3px rgba(78,107,60,0.25); }
.bl-field input[name="postcode"] { text-transform: uppercase; }
.bl-field input::placeholder { text-transform: none; color: #9a9a9a; }
.bl-btn {
  flex: 1 1 100%; height: 48px; padding: 0 22px; font: inherit; font-weight: 700; font-size: 1rem; color: #fff;
  background: var(--bl-green); border: 0; border-radius: 8px; cursor: pointer;
}
[data-theme="dark"] .bl-btn { color: #14200d; }
.bl-btn:hover { filter: brightness(1.08); }
.bl-btn:disabled { opacity: 0.6; cursor: progress; }
@media (min-width: 560px) { .bl-btn { flex: 0 0 auto; } }
.bl-remember { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.85rem; color: var(--bl-muted); cursor: pointer; }
.bl-remember input { width: 16px; height: 16px; accent-color: var(--bl-green); }
.bl-ts:not(:empty) { margin-top: 10px; }
.bl-status:not(:empty) { margin-top: 12px; font-size: 0.95rem; color: var(--bl-muted); display: flex; align-items: center; gap: 10px; }
.bl.is-busy .bl-status::before {
  content: ''; width: 18px; height: 18px; flex: 0 0 18px; border-radius: 50%;
  border: 2.5px solid var(--bl-soft); border-top-color: var(--bl-green); animation: bl-spin 0.8s linear infinite;
}
@keyframes bl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bl.is-busy .bl-status::before { animation-duration: 3s; } }
.bl-out:not(:empty) { margin-top: 16px; }
.bl-error { background: var(--bl-err-bg); color: var(--bl-err); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.bl-error a { color: inherit; }
.bl-for { margin: 0 0 10px; font-size: 0.95rem; color: var(--bl-muted); }
.bl-for strong { color: var(--bl-text); }
/* Results read like a council bin calendar: date column, then what goes out */
.bl .bl-cal { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--bl-border); }
.bl .bl-cal > li { display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; margin: 0; padding: 10px 0; border-top: 1px solid var(--bl-border); }
.bl-day { display: flex; flex-direction: column; line-height: 1.25; }
.bl-date { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 1.05rem; }
.bl-rel { font-size: 0.82rem; color: var(--bl-muted); }
.bl .bl-cal > li.is-next .bl-date, .bl .bl-cal > li.is-next .bl-rel { color: var(--bl-green-dark); }
[data-theme="dark"] .bl .bl-cal > li.is-next .bl-date, [data-theme="dark"] .bl .bl-cal > li.is-next .bl-rel { color: var(--bl-green); }
.bl .bl-what { list-style: none; margin: 0; padding: 0; }
.bl .bl-what li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 1px 0; line-height: 1.3; overflow-wrap: anywhere; }
.bl-bin-svg { width: 17px; height: 25px; flex: 0 0 17px; }
.bl-colour { color: var(--bl-muted); font-size: 0.9rem; }
.bl-tonight { margin: 4px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--bl-green-dark); }
[data-theme="dark"] .bl-tonight { color: var(--bl-green); }
.bl-share { margin: 10px 0 0; font-size: 0.9rem; color: var(--bl-muted); }
.bl-link { font: inherit; color: var(--bl-green); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bl-cta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--bl-border); display: flow-root; font-size: 0.92rem; }
.bl-cta p { margin: 0; }
.bl-play { float: right; margin: 0 0 4px 12px; }
.bl-play img { height: 44px; width: auto; display: block; }
/* Placement on site pages */
.bin-day-page .bl, .council-page .bl, .council-hub .bl { margin: 1.5em 0 2em; border: 1px solid #dcdcd5; box-shadow: none; }
.bin-day-lede { font-size: 1.1rem; }
.hero-lookup { margin-top: 24px; max-width: 540px; }
.hero-lookup .bl { box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
@media (min-width: 768px) { .hero-lookup ~ .cta-row { margin-bottom: 56px; } }
