/* Power of One (POO) - Unified public form styling
   Mobile-first, consistent spacing, consistent input appearance.
*/

:root{
  --poo-radius-card: 18px;
  --poo-radius-input: 12px;
  --poo-radius-btn: 14px;
  --poo-border: #e4e4e4;
  --poo-border-strong: #d6d6d6;
  --poo-text: #111;
  --poo-muted: #555;
  --poo-bg: #fff;
  --poo-bg-soft: #fafafa;
  --poo-primary: #111;
  --poo-shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* Wrapper + card */
.poo-wrap{
  width: 100%;
  max-width: 980px;
  margin: 22px auto;
  padding: 0 14px;
  box-sizing: border-box;
  color: var(--poo-text);
}

/* Wider container for walls (controlled in POO Display Settings) */
.poo-wrap.poo-wrap-wall{
  max-width: var(--poo-wall-maxw, 1240px);
}
.poo-card, .poo-form-card{
  background: var(--poo-bg);
  border: 1px solid var(--poo-border);
  border-radius: var(--poo-radius-card);
  box-shadow: var(--poo-shadow);
  padding: 18px;
}

/* Flat card mode (no borders/shadow) for wall layouts */
.poo-card.poo-card-flat{
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Headings inside shortcode output (avoid giant titles) */
.poo-wrap h1,.poo-wrap h2,.poo-wrap h3{
  margin: 0 0 14px 0;
  line-height: 1.15;
}

/* Layout rows */
.poo-form{ margin: 0; }
.poo-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.poo-row.poo-row-3{ grid-template-columns: 1fr 1fr 1fr; }
.poo-row.poo-row-1{ grid-template-columns: 1fr; }

@media (max-width: 820px){
  .poo-row, .poo-row.poo-row-3{ grid-template-columns: 1fr; }
}

/* Labels + help */
.poo-label{ display:block; font-weight: 700; margin: 0 0 6px 0; }
.poo-help{ display:block; margin-top: 6px; font-size: 13px; color: var(--poo-muted); }

/* UNIVERSAL FIELD STYLING
   Many of your forms output <input> without a type attribute.
   This selector styles those too, so everything matches the "Email" field.
*/
.poo-wrap input:not([type]),
.poo-wrap input[type="text"],
.poo-wrap input[type="email"],
.poo-wrap input[type="tel"],
.poo-wrap input[type="number"],
.poo-wrap input[type="search"],
.poo-wrap input[type="url"],
.poo-wrap input[type="password"],
.poo-wrap select,
.poo-wrap textarea{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: 16px !important; /* prevents iOS zoom */
  line-height: 1.25 !important;
  padding: 12px 14px !important;
  border: 1px solid var(--poo-border-strong) !important;
  border-radius: var(--poo-radius-input) !important;
  background: #fff !important;
  color: var(--poo-text) !important;
  outline: none !important;
  min-height: 44px !important;
}

.poo-wrap textarea{
  min-height: 120px !important;
  resize: vertical !important;
}

.poo-wrap input[type="file"]{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  font-size: 16px !important;
}

.poo-wrap input:focus,
.poo-wrap select:focus,
.poo-wrap textarea:focus{
  border-color: var(--poo-primary) !important;
  box-shadow: 0 0 0 3px rgba(17,17,17,.12) !important;
}

/* Buttons */
.poo-btn,
.poo-wrap button,
.poo-wrap input[type="submit"]{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  padding: 14px 16px;
  border-radius: var(--poo-radius-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}
.poo-btn-primary,
.poo-wrap input[type="submit"],
.poo-wrap button[type="submit"]{
  background: var(--poo-primary);
  color: #fff;
}
.poo-btn-primary:hover,
.poo-wrap input[type="submit"]:hover,
.poo-wrap button[type="submit"]:hover{
  filter: brightness(0.92);
}
.poo-btn-secondary{
  background: var(--poo-bg-soft);
  color: var(--poo-text);
  border-color: var(--poo-border-strong);
}

/* Full-width primary actions on mobile */
@media (max-width: 820px){
  .poo-wrap input[type="submit"],
  .poo-wrap button[type="submit"],
  .poo-btn{ width: 100%; }
}

/* Alerts */
.poo-alert{ padding: 12px 14px; border-radius: 14px; border: 1px solid var(--poo-border); margin: 0 0 14px 0; }
.poo-alert-success{ background: #f1fbf4; border-color: #cfe9d6; }
.poo-alert-error{ background: #fff1f2; border-color: #f3c2c7; }

/* Panels (like multi-donor box) */
.poo-panel{
  background: var(--poo-bg-soft);
  border: 1px dashed var(--poo-border-strong);
  border-radius: 16px;
  padding: 14px;
}

/* Cloudflare Turnstile spacing */
.poo-wrap .cf-turnstile{ margin: 14px auto; display: flex; justify-content: center; }

/* -----------------------------
   Walls: image-only + hover name
   ----------------------------- */

.poo-wall-grid,
.poo-donor-wall-grid,
.poo-group-wall,
.poo-agent-wall,
.poo-volunteer-wall,
.poo-partner-wall{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--poo-wall-img,84px) + 20px), 1fr));
  gap: 14px;
  align-items: center;
}

.poo-wall-item{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 6px;
}

.poo-wall-img{
  width: var(--poo-wall-img,84px);
  height: var(--poo-wall-img,84px);
  border-radius: 999px;
  object-fit: cover;
  border: 0 !important;
  background: #fff;
  display: block;
}

.poo-wall-img.poo-img-contain{
  border-radius: 16px;
  object-fit: contain;
}

.poo-wall-name{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6px;
  max-width: calc(var(--poo-wall-img,84px) + 40px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0,0,0,.76);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.poo-wall-item:hover .poo-wall-name{ opacity: 1; }

/* Search images (controlled in POO Display Settings) */
.poo-search-photo,
.poo-search-thumb,
.poo-search-qr{
  width: var(--poo-search-img,140px) !important;
  height: var(--poo-search-img,140px) !important;
  max-width: var(--poo-search-img,140px) !important;
  max-height: var(--poo-search-img,140px) !important;
  object-fit: cover;
  border-radius: 18px;
  border: 0 !important;
  display: block;
}

