/* Plant Watering Tracker — styles.css */

*, *::before, *::after { box-sizing: border-box; }

/* Theme colour transitions — cosmetic properties only */
body, nav, footer, .bg-card, .bg-accent, input, textarea, button, a {
  transition-property: background-color, border-color, color, box-shadow, opacity;
  transition-duration: 200ms;
  transition-timing-function: ease-in-out;
}
button, a {
  transition-property: background-color, border-color, color, box-shadow, opacity, transform;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--color-accent,#bbf7d0); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary,#22c55e); }

/* ── Focus ring ─────────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2.5px var(--color-primary,#22c55e);
}

/* ── Theme tile checked ring ────────────────────────────────────── */
input[type="radio"].sr-only:checked + .theme-tile,
input[type="radio"].peer:checked ~ .theme-tile {
  box-shadow: 0 0 0 3px var(--color-primary,#22c55e);
}

/* ── Upload zone hover ──────────────────────────────────────────── */
#upload-zone:hover {
  background-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
}

/* ── Sprint 0.2 · Confirm modal backdrop ────────────────────────── */
dialog::backdrop {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}
dialog {
  /* <dialog> resets */
  border: none;
  padding: 0;
}
#confirm-modal {
  background-color: var(--color-card, #fff);
  color: var(--color-text, #14532d);
  border: 1px solid var(--color-accent, #bbf7d0);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: calc(100% - 2rem);
  max-width: 24rem;
}
/* Sprint 4.2 · Lightbox */
#lightbox {
  background: transparent;
  border: none;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  padding: 0;
}
#lightbox::backdrop {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
}
#lightbox-img {
  max-height: 88vh;
  max-width: 88vw;
  border-radius: 1rem;
  display: block;
}

/* ── Sprint 2.7 · Remove overdue pulse (calm UX) ───────────────── */
/* Previously: .status-overdue { animation: pulse-soft ... }
   Removed — a static red badge is sufficient signal.           */

/* ── Dormant badge ──────────────────────────────────────────────── */
.badge-dormant {
  background: #f3f4f6;
  color: #6b7280;
}

/* ── Minimum touch-target size (WCAG 2.5.5 / iOS HIG) ─────────────
   Tailwind's min-h-[44px] handles most cases; this is a global safety net
   for buttons and links that don't have explicit sizing.              */
button, [role="button"], a, summary, label[onclick] {
  position: relative; /* required for ::after pseudo-element */
}
/* Expand tap area without changing visual size */
button::after, [role="button"]::after {
  content: '';
  position: absolute;
  inset: -4px;
}

/* ── sr-only utility ────────────────────────────────────────────── */
.sr-only {
  position: absolute; width:1px; height:1px; padding:0;
  margin:-1px; overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}
