/*
 * DCC-i Events 0.1.12: Help shape the Expo form.
 * Self-contained so it looks the same on the Expo event page and on any page using the
 * [dcci_help_shape_expo] shortcode. Uses the DCC-i Online theme tokens, with fallbacks.
 * Sizes are in rem/em so the accessibility panel's text-size options scale them.
 */
.dcev-contribute {
  --hs-purple: var(--do-purple, #5b2bb5);
  --hs-purple-dark: var(--do-purple-dark, #3d1b82);
  --hs-ink: var(--do-purple-ink, #24113f);
  --hs-lavender: var(--do-lavender, #f5f0fd);
  --hs-cream: #fdf9f3;
  --hs-pink: var(--do-pink, #c41d63);
  --hs-pink-soft: var(--do-pink-soft, #fde6f0);
  --hs-text: var(--do-ink, #1f1830);
  --hs-muted: var(--do-muted, #564d6b);
  --hs-line: var(--do-line, #e4daf6);
  --hs-field: #8f7aab;
  --hs-focus: var(--do-focus, #e0287a);
  --hs-error: #a3123f;
  --hs-ok: var(--do-green, #17692d);
  font-family: var(--do-font, 'Montserrat', system-ui, sans-serif);
  color: var(--hs-text);
}
.dcev-contribute *, .dcev-contribute *::before, .dcev-contribute *::after { box-sizing: border-box; }
.dcev-contribute [hidden] { display: none !important; }
.dcev-contribute :focus-visible { outline: 3px solid var(--hs-focus); outline-offset: 3px; border-radius: 6px; }

/* Card beside the booking panel */
.dcev-contribute--card { margin: 0 0 1.25rem; padding: 1.25rem; background: var(--hs-cream); border: 1px solid #efe3d2; border-radius: 18px; }
.dcev-contribute__card-title { margin: 0 0 .4rem !important; font-size: 1.25rem !important; color: var(--hs-ink); }
.dcev-contribute__card-text { margin: 0 0 1rem !important; font-size: .95rem; line-height: 1.5; }
.dcev-contribute__card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 !important; }
.dcev-contribute__open, .dcev-contribute__submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1.4rem;
  border: 2px solid transparent; border-radius: 999px; background: var(--hs-purple); color: #fff; font: inherit; font-weight: 700;
  font-size: 1rem; line-height: 1.2; cursor: pointer; box-shadow: 0 3px 0 var(--hs-ink); transition: background .15s ease;
}
.dcev-contribute__open:hover, .dcev-contribute__submit:hover { background: var(--hs-purple-dark); }
.dcev-contribute__submit[disabled] { opacity: .7; cursor: progress; }
.dcev-contribute__explore { font-weight: 700; color: var(--hs-purple) !important; text-decoration: underline; text-underline-offset: .2em; }
.dcev-contribute__explore::after { content: " \2192"; }

/* Modal */
.dcev-contribute__modal { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.dcev-contribute__shade { position: absolute; inset: 0; background: rgba(26,10,52,.75); }
.dcev-contribute__dialog {
  position: relative; width: min(100%, 44rem); max-height: min(92vh, 60rem); max-height: min(92dvh, 60rem); overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; background: #fff; border-radius: 22px; padding: clamp(1.25rem, 3.4vw, 2.25rem); box-shadow: 0 24px 85px rgba(0,0,0,.25);
}
.dcev-contribute__dialog > h2 { margin: .25rem 0 .5rem !important; font-size: clamp(1.6rem, 3vw, 2rem) !important; color: var(--hs-ink); }
.dcev-contribute__close {
  position: absolute; top: .75rem; right: .9rem; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--hs-lavender); color: var(--hs-purple-dark); font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.dcev-contribute__close:hover { background: #e9ddfb; }
.dcev-contribute__eyebrow { margin: 0 3rem 0 0 !important; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--hs-pink); }
.dcev-contribute__intro { margin: 0 0 .5rem !important; color: var(--hs-muted); line-height: 1.5; }
body.dcev-proposal-open { overflow: hidden; }

/* Inline (shortcode) */
.dcev-contribute--inline { max-width: 46rem; margin: 2rem auto; padding: clamp(1.25rem, 3.4vw, 2.25rem); background: #fff; border: 1px solid var(--hs-line); border-radius: 22px; box-shadow: 0 18px 36px -22px rgba(36,17,63,.35); scroll-margin-top: 6rem; }
.dcev-contribute__inline-title { margin: 0 0 .25rem !important; color: var(--hs-ink); }
.dcev-contribute__inline-title:focus { outline: none; }
.dcev-contribute-notice { padding: 1rem; border-left: 4px solid #dba617; background: #fcf9e8; }

/* Form */
.dcev-contribute__form { display: grid; gap: 1.25rem; margin-top: 1rem; }
.dcev-contribute__section { margin: 0; padding: 1.1rem 1.1rem 1.25rem; border: 1px solid var(--hs-line); border-radius: 18px; background: var(--hs-lavender); display: grid; gap: 1rem; min-width: 0; }
.dcev-contribute__section > legend { padding: 0 .4rem; font-weight: 800; font-size: 1.05rem; color: var(--hs-ink); display: flex; align-items: center; gap: .5rem; }
/* Section numbers count only the sections showing, so they always run 1, 2, 3… (0.1.13). */
.dcev-contribute__form { counter-reset: hs-step; }
.dcev-contribute__section:not([hidden]) { counter-increment: hs-step; }
.dcev-contribute__step::before { content: counter(hs-step); }
.dcev-contribute__step { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--hs-pink); color: #fff; font-size: .8em; }
.dcev-contribute__reveal.dcev-contribute__section { background: var(--hs-cream); border-color: #efe3d2; }
fieldset.dcev-contribute__reveal:not(.dcev-contribute__section) { border: 0; margin: 0; padding: 0; min-width: 0; }
.dcev-contribute__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dcev-contribute__field { display: grid; gap: .35rem; min-width: 0; }
.dcev-contribute__field > label, .dcev-contribute__group > legend { font-weight: 700; color: var(--hs-ink); line-height: 1.35; }
.dcev-contribute__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.dcev-contribute__group > legend { padding: 0; margin-bottom: .2rem; }
.dcev-contribute__hint { margin: 0 !important; font-size: .88rem; color: var(--hs-muted); line-height: 1.45; }
.dcev-contribute__hint:empty { display: none; }
.dcev-contribute__optional { font-weight: 400; font-size: .85em; color: var(--hs-muted); }
.dcev-contribute input:not([type=checkbox]):not([type=radio]), .dcev-contribute textarea {
  display: block; width: 100%; min-height: 46px; padding: .65rem .75rem; border: 1px solid var(--hs-field); border-radius: 10px;
  background: #fff; color: var(--hs-text); font: inherit; font-size: 1rem;
}
.dcev-contribute textarea { resize: vertical; min-height: 5.5em; }
.dcev-contribute input[type=file] { min-height: 0; padding: .55rem; font-size: .92rem; }
.dcev-contribute__choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: .5rem; margin-top: .55rem; }
.dcev-contribute__choice {
  display: flex; align-items: flex-start; gap: .6rem; min-height: 44px; padding: .6rem .75rem; border: 1px solid var(--hs-line);
  border-radius: 12px; background: #fff; font-weight: 500; line-height: 1.35; cursor: pointer;
}
.dcev-contribute__choice input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: .1rem 0 0; accent-color: var(--hs-purple); cursor: pointer; }
.dcev-contribute__choice:has(input:checked) { border-color: var(--hs-purple); background: #f1e9ff; box-shadow: inset 0 0 0 1px var(--hs-purple); }
.dcev-contribute__choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.dcev-contribute__group [data-dcev-room-help] , .dcev-contribute__group > .dcev-contribute__choice { margin-top: .5rem; }
.dcev-contribute__privacy { display: grid; gap: .75rem; font-size: .92rem; line-height: 1.5; }
.dcev-contribute__privacy p { margin: 0 !important; }
.dcev-contribute__privacy a { color: var(--hs-purple) !important; font-weight: 700; }
.dcev-contribute__ack { background: var(--hs-cream); border-color: #efe3d2; }
.dcev-contribute__submit { justify-self: start; background: var(--hs-pink); box-shadow: 0 3px 0 var(--hs-ink); }
.dcev-contribute__submit:hover { background: #9e1650; }

/* Validation and status */
.dcev-contribute__error { display: block; color: var(--hs-error); font-weight: 700; font-size: .9rem; }
.dcev-contribute__error::before { content: "! "; }
.dcev-contribute [aria-invalid="true"] { border-color: var(--hs-error) !important; box-shadow: 0 0 0 1px var(--hs-error); }
.dcev-contribute__group[data-invalid] .dcev-contribute__choices, .dcev-contribute__choice[data-invalid] { outline: 2px solid var(--hs-error); outline-offset: 4px; border-radius: 12px; }
.dcev-contribute__status:not(:empty) { padding: .9rem 1rem; border-radius: 12px; background: #f2e9ff; color: #35155b; font-weight: 600; }
.dcev-contribute__status[data-state="error"] { background: #fdecef; color: var(--hs-error); }
.dcev-contribute__status[data-state="ok"] { background: #e9f7ee; color: #0f4d22; font-size: 1.05rem; }
.dcev-contribute__status:focus { outline: none; }
.dcev-contribute__honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
  .dcev-contribute__row { grid-template-columns: 1fr; }
  .dcev-contribute__modal { padding: .5rem; align-items: stretch; }
  .dcev-contribute__dialog { max-height: none; height: 100%; border-radius: 16px; padding: 1.25rem 1rem; }
  .dcev-contribute__section { padding: 1rem .8rem; }
  .dcev-contribute__submit, .dcev-contribute__open { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dcev-contribute * { transition: none !important; scroll-behavior: auto !important; } }
.accessibility-high-contrast .dcev-contribute__section, .accessibility-high-contrast .dcev-contribute__choice { background: #fff; border-color: #000; }
.accessibility-high-contrast .dcev-contribute input, .accessibility-high-contrast .dcev-contribute textarea { border-color: #000; }
@media print { .dcev-contribute__modal { display: none !important; } }
/* 0.1.14: "Share your idea" can be a link (when the form is on the page); keep it a white-on-purple button. */
.dcev-contribute a.dcev-contribute__open, .dcev-contribute a.dcev-contribute__open:visited, .dcev-contribute a.dcev-contribute__open:hover { color: #fff !important; text-decoration: none; }
