/* ==========================================================================
   WHAT DAD REALLY WANTS — SITE-WIDE THEME
   Based on Charlie’s Happy Life visual style
========================================================================== */

:root{
  --brand-bg:#f8f2e7;          /* warm cream background */
  --brand-text:#333333;        /* main text */
  --brand-head:#653a1f;        /* headings + primary buttons */
  --brand-accent:#a3582f;      /* links/secondary */
  --radius-card:14px;
  --shadow-card:0 2px 10px rgba(0,0,0,.05);
}

/* ========== Base / Global ========== */
body{
  background:var(--brand-bg);
  font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--brand-text);
  line-height:1.6;
  margin:0;
}
a{ color:var(--brand-accent); text-decoration:none; font-weight:600; }
a:hover{ text-decoration:underline; }

/* ========== Header / Nav (stacked) ========== */
header{
  background:var(--brand-head);
  color:#fff;
  padding:1rem 1.25rem;
  text-align:center;
}
header .inner{
  max-width:1000px;
  margin:0 auto;
  display:flex;
  flex-direction:column;     /* stack logo over nav */
  align-items:center;        /* center everything */
  gap:.5rem;                 /* space between logo and nav */
}

/* Logo size */
.logo img{
  height:156px;               /* tweak as you like: 48–64px looks good */
  width:auto;
  display:block;
}

/* Nav styles */
header nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:1rem;                  /* space between links */
  margin-top:.25rem;
}
header nav a{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  padding:.15rem .25rem;
}
header nav a:hover{
  text-decoration:underline;
}

/* On small screens, slightly reduce logo height */
@media (max-width:640px){
  .logo img{ height:66px; }
}

/* ========== Main Layout ========== */
main{
  max-width:750px; margin:2rem auto; background:#fff;
  border-radius:var(--radius-card); padding:2rem; box-shadow:var(--shadow-card);
}
h1,h2,h3,h4{ color:var(--brand-head); font-weight:700; line-height:1.3; }

/* make muted frameworks readable */
p,li,em{ color:var(--brand-text); opacity:1!important; font-style:normal; }

/* helper headings/text */
.section-title{ margin:0 0 .75rem; }
.subtle{ color:#666; }

/* ========== Buttons / Forms ========== */
button,.btn,input[type="submit"]{
  background:var(--brand-head); color:#fff; border:none; border-radius:6px;
  padding:.5rem 1.2rem; cursor:pointer; font-size:.95rem;
}
button:hover,.btn:hover,input[type="submit"]:hover{ background:#4a2814; }
input[type="email"],input[type="text"],input[type="url"],input[type="number"]{
  border:1px solid #ccc; border-radius:6px; padding:.4rem .6rem; width:100%;
  font-size:1rem; margin-top:4px; box-sizing:border-box;
}
label{ display:block; margin-bottom:1rem; font-weight:500; }

/* Primary full-width submit (e.g., Add Item) */
.btn-primary{
  background:#1d4ed8; color:#fff; border:none; border-radius:8px;
  padding:.7rem 1.2rem; font-weight:700; width:100%;
}
.btn-primary:hover{ background:#1e40af; }

/* ========== Share / Copy bar ========== */
.sharebar{
  display:flex; gap:.5rem; align-items:center; flex-wrap:wrap;
  margin:.25rem 0 1rem;
}
.sharebar code{
  flex:1 1 420px; display:inline-block; padding:.5rem .6rem;
  background:#f1f5f9; border:1px solid #e5e7eb; border-radius:6px;
  overflow:auto; white-space:nowrap;
}
.btn-copy{
  background:#0ea5e9; border:none; color:#fff; font-weight:600;
  border-radius:8px; padding:.55rem .9rem; cursor:pointer;
}
.btn-copy:hover{ background:#0284c7; }

/* ========== Add Item form grid ========== */
.form-grid{
  display:grid; grid-template-columns:1fr 1fr 160px 1fr; gap:.75rem;
  align-items:end; margin:.5rem 0 1rem;
}
.form-grid label{ font-weight:600; margin-bottom:.25rem; display:block; }
.form-grid input[type="text"],
.form-grid input[type="url"],
.form-grid input[type="number"]{ width:100%; padding:.55rem .6rem; border:1px solid #d1d5db; border-radius:6px; }
input[type="file"]{ width:100%; }
@media (max-width:860px){
  .form-grid{ grid-template-columns:1fr 1fr; }
  .form-grid .col-span-2{ grid-column:span 2; }
}

/* ========== Cards / Items ========== */
.stack{ display:flex; flex-direction:column; gap:14px; }
.card,article{
  background:#fff; border-radius:var(--radius-card); box-shadow:var(--shadow-card);
  padding:1.5rem; margin-bottom:1.5rem;
}
.card{
  display:flex;
  gap:14px;
  align-items:flex-start;
  border:5px dashed var(--brand-head);  /* brown, dashed, 5px */
  border-radius:14px;                    /* keep rounded corners */
}
.card .thumb{
  width:160px; height:160px; object-fit:cover; border-radius:12px; flex:0 0 auto;
}
.card .meta h4{ margin:0 0 6px; font-size:1.05rem; }
.card .meta p{ margin:4px 0; }
@media (max-width:640px){
  .card{ flex-direction:column; }
  .card .thumb{ width:100%; height:auto; max-height:300px; }
}

/* Images (generic) */
img{ max-width:100%; border-radius:8px; display:block; margin:0 auto; }

/* ========== Claim section ========== */
.claim-form{ margin-top:1rem; border-top:1px solid #eee; padding-top:1rem; }
.claim-btn{ margin-top:.5rem; }

/* feedback messages */
.info{ color:green; font-weight:600; }
.error{ color:#b91c1c; font-weight:600; }

/* Danger button */
.btn-danger{
  background:#b91c1c;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:.45rem .9rem;
  font-weight:700;
  cursor:pointer;
}
.btn-danger:hover{ background:#991b1b; }

/* ========== Footer ========== */
footer{
  text-align:center; font-size:.9rem; color:#666; padding:2rem 0;
}
/* Force the dashed brown border, overriding any page-level rules */
.stack .card {
  border: 5px dashed var(--brand-head) !important;
  border-radius: 14px;
}
/* ========== Section Highlights ========== */
.section-box {
  border: 3px dashed var(--brand-head);
  border-radius: 10px;
  padding: 1.2rem;
  margin: 1.5rem 0;
  background: #fffaf5; /* subtle warm background */
}
.section-box h3, 
.section-box strong {
  color: var(--brand-head);
}

/* ===== Autocomplete + Random button ===== */
.ac-wrap{ position:relative; }
.ac-with-random{ display:flex; gap:.5rem; align-items:flex-start; }
.ac-with-random input{ flex:1 1 auto; }

.btn-random{
  background:#0ea5e9;
  color:#fff;
  border:none;
  border-radius:8px;
  padding:.55rem .9rem;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.btn-random:hover{ background:#0284c7; }

.autocomplete-list{
  position:absolute; top:100%; left:0; right:0;
  background:#fff; border:1px solid #e5e7eb; border-top:none;
  border-radius:0 0 8px 8px; box-shadow:0 6px 20px rgba(0,0,0,.06);
  list-style:none; margin:0; padding:0; max-height:260px; overflow-y:auto; z-index:50; display:none;
}
.autocomplete-item{ padding:.5rem .65rem; cursor:pointer; border-top:1px solid #f3f4f6; }
.autocomplete-item:hover,.autocomplete-item.is-active{ background:#f9fafb; }

@media (max-width:640px){
  .ac-with-random{ flex-direction:column; align-items:stretch; }
  .btn-random{ width:100%; }
}

