/* BAA Campaign Picture Maker. Everything is scoped to #baa-dp so the theme's
   reset styles (for example Hello Elementor's pink buttons) do not apply. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

#baa-dp {
  --dp-crimson: #8E1218;
  --dp-jasmine: #F4D58D;
  --dp-bg: #FEFBF4;
  --dp-ink: #383838;
  --dp-ink-soft: #5A5A5A;
  --dp-carbon: #171717;
  --dp-panel: #FFFFFF;
  --dp-line: #E2DACB;
  background: var(--dp-bg);
  color: var(--dp-ink);
  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
#baa-dp *, #baa-dp *::before, #baa-dp *::after { box-sizing: border-box; }
#baa-dp [hidden] { display: none !important; }

#baa-dp .dp-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 16px 3rem;
}

#baa-dp .dp-inapp {
  margin: 0 0 1rem;
  padding: .8rem 1rem;
  background: var(--dp-jasmine);
  color: var(--dp-carbon);
  border-radius: 12px;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.4;
}

#baa-dp .dp-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 44px;
  font-weight: 500;
  font-size: .95rem;
  color: var(--dp-crimson);
  text-decoration: none;
}
#baa-dp .dp-back:hover { text-decoration: underline; text-underline-offset: 4px; }
#baa-dp .dp-back:focus-visible {
  outline: 2px solid var(--dp-crimson);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--dp-jasmine);
  border-radius: 4px;
}

#baa-dp .dp-title {
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.02;
  font-size: clamp(2rem, 7vw, 3.5rem);
  color: var(--dp-carbon);
  margin: .5rem 0 .6rem;
  max-width: 16ch;
}
#baa-dp .dp-lead {
  color: var(--dp-ink-soft);
  max-width: 56ch;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

/* Mobile first: preview on top, controls below. */
#baa-dp .dp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }

#baa-dp .dp-canvas-box {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #EDE7DB;
  aspect-ratio: 1 / 1;
  box-shadow: 0 1px 2px rgba(23, 23, 23, .08), 0 8px 24px rgba(23, 23, 23, .08);
}
@supports not (aspect-ratio: 1 / 1) {
  #baa-dp .dp-canvas-box { height: 0; padding-bottom: 100%; }
}
#baa-dp canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
  border-radius: 16px;
}
#baa-dp .has-photo canvas { cursor: grab; touch-action: none; }
#baa-dp .has-photo canvas.dragging { cursor: grabbing; }
#baa-dp .dp-loading {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: var(--dp-ink-soft);
  font-weight: 500;
  background: #EDE7DB;
  pointer-events: none;
}

#baa-dp .dp-controls {
  background: var(--dp-panel);
  border: 1px solid var(--dp-line);
  border-radius: 16px;
  padding: 1.25rem;
}

#baa-dp .dp-fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
#baa-dp legend,
#baa-dp label,
#baa-dp .dp-label {
  display: block;
  padding: 0;
  font-weight: 500;
  font-size: .95rem;
  color: var(--dp-carbon);
  letter-spacing: -.01em;
  margin: 0 0 .5rem;
}

#baa-dp .dp-choices { display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 420px) { #baa-dp .dp-choices { grid-template-columns: 1fr 1fr; } }
#baa-dp .dp-choice { position: relative; }
#baa-dp .dp-choice label {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0;
  height: 100%;
  min-height: 64px;
  padding: .8rem .9rem;
  border: 1.5px solid #857B6C;
  border-radius: 12px;
  background: var(--dp-panel);
  cursor: pointer;
  line-height: 1.25;
}
#baa-dp .dp-swatch { flex: none; width: 28px; height: 28px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
#baa-dp .dp-choice-name { display: block; font-weight: 600; letter-spacing: -.02em; color: var(--dp-carbon); }
#baa-dp .dp-choice-sub { display: block; font-weight: 400; font-size: .82rem; color: var(--dp-ink-soft); margin-top: .15rem; }
#baa-dp .dp-choice input:checked + label {
  border-color: var(--dp-crimson);
  box-shadow: inset 0 0 0 1.5px var(--dp-crimson);
  background: #FBF3F3;
}

#baa-dp .dp-field { margin: 0 0 1.25rem; }
#baa-dp .dp-row { display: flex; flex-wrap: wrap; gap: .5rem; }
#baa-dp .dp-hint { color: var(--dp-ink-soft); font-size: .85rem; margin: .4rem 0 0; }

#baa-dp input[type="text"],
#baa-dp select {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: .7rem .9rem;
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zooming into the field */
  color: var(--dp-carbon);
  background: #FFFFFF;
  border: 1.5px solid #857B6C;
  border-radius: 12px;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
#baa-dp select {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23383838' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
#baa-dp [aria-invalid="true"] { border-color: var(--dp-crimson); background-color: #FBF3F3; }

#baa-dp input[type="range"] {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  accent-color: var(--dp-crimson);
  background: transparent;
}
#baa-dp input[type="range"]:disabled { opacity: .45; }

/* Buttons. The theme styles bare buttons, so every property is set here. */
#baa-dp .dp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: .7rem 1.15rem;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: none;
  text-decoration: none;
  color: var(--dp-crimson);
  background: #FFFFFF;
  border: 1.5px solid var(--dp-crimson);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#baa-dp .dp-btn:hover { background: #FBF3F3; color: var(--dp-crimson); }
#baa-dp .dp-btn:disabled { opacity: .45; cursor: not-allowed; background: #FFFFFF; }
#baa-dp .dp-btn-primary {
  width: 100%;
  min-height: 56px;
  font-size: 1.075rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--dp-crimson);
  border-color: var(--dp-crimson);
}
#baa-dp .dp-btn-primary:hover { background: #730E13; color: #FFFFFF; }
#baa-dp .dp-btn-primary[aria-busy="true"] { opacity: .8; cursor: progress; }

/* Focus: Jasmine halo with a crimson ring, visible on light and dark areas. */
#baa-dp .dp-btn:focus-visible,
#baa-dp input[type="text"]:focus-visible,
#baa-dp select:focus-visible,
#baa-dp input[type="range"]:focus-visible,
#baa-dp canvas:focus-visible,
#baa-dp .dp-vh:focus-visible + label,
#baa-dp .dp-choice input:focus-visible + label {
  outline: 2px solid var(--dp-crimson);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--dp-jasmine);
}
#baa-dp input[type="text"]:focus,
#baa-dp select:focus { border-color: var(--dp-crimson); }

/* Visually hidden but still focusable. */
#baa-dp .dp-vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

#baa-dp .dp-privacy { font-size: .875rem; color: var(--dp-ink-soft); margin: .75rem 0 0; }
#baa-dp .dp-status { min-height: 1.5em; margin: .75rem 0 0; font-weight: 500; color: var(--dp-carbon); }
#baa-dp .dp-status:empty { margin: 0; min-height: 0; }
#baa-dp .dp-tags { margin: .5rem 0 0; font-size: .875rem; font-weight: 500; color: var(--dp-crimson); word-spacing: .2em; }

#baa-dp .dp-result {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dp-line);
  scroll-margin-top: 1rem;
}
#baa-dp .dp-result-title {
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -.03em;
  color: var(--dp-carbon);
  margin: 0 0 .25rem;
}
#baa-dp .dp-result-hint { margin: 0 0 .75rem; font-weight: 500; }
#baa-dp .dp-result-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 540px;
  border-radius: 12px;
  margin: 0 0 .75rem;
  /* Allow the native press-and-hold menu. */
  -webkit-touch-callout: default;
  -webkit-user-select: auto;
  user-select: auto;
}
#baa-dp .dp-caption-box { margin-top: 1rem; }
#baa-dp .dp-caption {
  margin: 0 0 .6rem;
  padding: .8rem .9rem;
  background: var(--dp-bg);
  border: 1px solid var(--dp-line);
  border-radius: 12px;
  font-size: .95rem;
  -webkit-user-select: all;
  user-select: all;
}

#baa-dp .dp-done {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--dp-bg);
  border: 1px solid var(--dp-line);
  border-radius: 12px;
}
#baa-dp .dp-done-title { margin: 0; font-weight: 600; color: var(--dp-carbon); }
#baa-dp .dp-done .dp-hint { margin: .25rem 0 .75rem; }
#baa-dp .dp-btn-solid,
#baa-dp .dp-btn-solid:hover { color: #FFFFFF; background: var(--dp-crimson); }
#baa-dp .dp-btn-solid:hover { background: #730E13; }

/* Desktop: controls on the left, sticky preview on the right. */
@media (min-width: 880px) {
  #baa-dp .dp-wrap { padding: 2.5rem 24px 4rem; }
  #baa-dp .dp-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-areas: "controls preview";
    gap: 2rem;
    align-items: start;
  }
  #baa-dp .dp-preview { grid-area: preview; position: sticky; top: 1.5rem; }
  #baa-dp .dp-controls { grid-area: controls; padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  #baa-dp * { transition: none !important; animation: none !important; }
}

/* The site header is transparent with a white logo and menu, so other pages
   put a dark hero behind it. This page gets the same crimson as the hero. */
body.baa-dp-page .elementor-location-header { background-color: #8C1116; }

/* Lighter copy of the site footer background, for this page only.
   The site-wide footer_baa.png is 1.5 MB; this is the same picture as WebP. */
body.baa-dp-page .elementor-27 .elementor-element.elementor-element-32d0b28:not(.elementor-motion-effects-element-type-background),
body.baa-dp-page .elementor-27 .elementor-element.elementor-element-32d0b28 > .elementor-motion-effects-container > .elementor-motion-effects-layer {
  background-image: url("../img/footer-baa.jpg");
  background-image: image-set(url("../img/footer-baa.webp") type("image/webp"), url("../img/footer-baa.jpg") type("image/jpeg"));
}
