:root{
  --ab-brand1:#96bf0d;
  --ab-brand2:#f18e00;
  --ab-brand3:#1abae9;
  --ab-text: var(--wp--preset--color--contrast, #111827);
  --ab-bg: var(--wp--preset--color--base, #ffffff);
  --ab-page-bg: #f3f7fb;
  --ab-form-bg: #ffffff;
  --ab-fieldset-bg: #f8fdf2;
  --ab-border:#e5e7eb;
}

.ab-afw-page{
  background: var(--ab-page-bg);
  padding:1rem 0 2rem;
  min-height:100vh;
}

.ab-afw-card{
  max-width:820px;
  margin:1rem auto;
  padding:1rem 1.25rem 1.25rem;
  border-radius:16px;
  background: var(--ab-form-bg);
  border:1px solid var(--ab-border);
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial;
  color: var(--ab-text);
}

.ab-afw-card .brandbar{
  height:8px;
  border-radius:10px;
  margin:-.25rem 0 1rem;
  background:linear-gradient(90deg,var(--ab-brand1) 0%,var(--ab-brand1) 33%,var(--ab-brand2) 33%,var(--ab-brand2) 66%,var(--ab-brand3) 66%,var(--ab-brand3) 100%);
}

.ab-afw-card h2{
  margin:0 0 .75rem 0;
  font-size:1.7rem;
}

.ab-afw-card .grid{display:grid;gap:.9rem}
.ab-afw-card .grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:640px){
  .ab-afw-card .grid.two{grid-template-columns:1fr}
}

label.stack{display:flex;flex-direction:column;font-weight:600;font-size:.95rem}
label.stack small{font-size:.8rem;color:#6b7280}

.ab-afw-card input,
.ab-afw-card select,
.ab-afw-card textarea{
  margin-top:.35rem;
  padding:.6rem .7rem;
  border:1px solid #d0d7de;
  border-radius:10px;
  font:inherit;
  max-width:100%;
  box-sizing:border-box;
  background:#fff;
}

.ab-afw-card select{
  width:100%;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.ab-afw-card fieldset{
  border:1px solid #eef2f7;
  padding:1rem;
  border-radius:12px;
  margin:.75rem 0 1rem;
  background:linear-gradient(180deg,var(--ab-fieldset-bg),var(--ab-fieldset-bg)),linear-gradient(90deg,var(--ab-brand1),var(--ab-brand2),var(--ab-brand3));
  background-origin:border-box;
  background-clip:padding-box,border-box;
}

.ab-afw-card legend{font-weight:800;color:#111}

label.choice{
  display:flex;
  align-items:center;
  gap:.5rem;
  margin:.35rem 0;
  font-weight:600;
  text-align:left;
}

label.choice input{margin:0}

.helptext{font-size:.9rem;color:#333;margin:.25rem 0 .5rem}

.ab-afw-card textarea{resize:vertical}

.actions{display:flex;align-items:center;gap:.75rem;margin-top:.5rem;flex-wrap:wrap}
.button-primary{
  background:#111827;
  color:#fff;
  border:none;
  padding:.65rem 1rem;
  border-radius:10px;
  cursor:pointer;
}
.button-link{
  border:none;background:none;color:#1f2937;padding:.35rem .5rem;border-radius:8px;cursor:pointer;text-decoration:underline;
}

.status{font-size:.95rem;color:#111}

.hidden{display:none}

.remember-row{
  display:flex;
  align-items:center;
  gap:.5rem;
  margin:.25rem 0 .5rem;
  flex-wrap:wrap;
}

.remember-row .muted{
  color:#6b7280;
  font-size:.9rem;
}

.ab-pwa{
  margin-top:1rem;
  padding:.75rem 1rem;
  border:1px dashed var(--ab-border);
  border-radius:12px;
  display:flex;
  flex-direction:column;
  gap:.5rem;
}

.ab-pwa .pwa-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.ab-pwa .muted{color:#6b7280;font-size:.9rem}
.ab-pwa .pwa-instructions{margin-top:.5rem;font-size:.9rem}

.privacy{margin-top:.25rem}

/* PWA standalone: hide theme header/footer for a cleaner app-like view */
html.ab-afw-standalone header,
html.ab-afw-standalone footer,
html.ab-afw-standalone #masthead,
html.ab-afw-standalone #colophon,
html.ab-afw-standalone .site-header,
html.ab-afw-standalone .site-footer,
html.ab-afw-standalone .elementor-location-header,
html.ab-afw-standalone .elementor-location-footer,
html.ab-afw-standalone .wp-site-blocks > header,
html.ab-afw-standalone .wp-site-blocks > footer,
html.ab-afw-standalone .ast-header,
html.ab-afw-standalone .ast-footer-wrap,
html.ab-afw-standalone #page > header,
html.ab-afw-standalone #page > footer{
  display:none !important;
}
