/* Local vector poster editor: no account or network request is needed. */
.poster-template-dialog {
  --poster-ink: #173f35;
  width: min(72rem, calc(100vw - 3rem));
  max-height: calc(100dvh - 3rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d6ddcd;
  border-radius: 1.5rem;
  background: #faf9f3;
  color: var(--poster-ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  box-shadow: 0 2rem 8rem #0a271b40;
  overscroll-behavior: contain;
}
.poster-template-dialog::backdrop {
  background: #0b2d25a3;
}
.poster-template-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #dfe4d9;
  background: #faf9f3;
}
.poster-template-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-family:
    "Bricolage Grotesque",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.poster-template-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #d6ddcd;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.poster-template-close svg {
  width: 1.25rem;
  height: 1.25rem;
}
.poster-template-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
}
.poster-template-controls {
  padding: 1.75rem;
}
.poster-template-controls > label,
.poster-template-options > label {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}
.poster-template-controls input:not([type="color"]),
.poster-template-controls select {
  width: 100%;
  min-height: 2.875rem;
  box-sizing: border-box;
  border: 1px solid #cbd5c6;
  border-radius: 0.625rem;
  padding: 0.65rem 0.75rem;
  background: #fffef9;
  color: var(--poster-ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 400;
}
.poster-template-controls input[aria-invalid="true"] {
  border-color: #a13d2b;
}
.poster-template-options {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.poster-template-controls input[type="color"] {
  width: 100%;
  min-height: 2.875rem;
  box-sizing: border-box;
  padding: 0.25rem;
  border: 1px solid #cbd5c6;
  border-radius: 0.625rem;
  background: #fffef9;
  cursor: pointer;
}
.poster-template-hint {
  margin: -0.35rem 0 1rem;
  color: #56685a;
  font-size: 0.75rem;
  line-height: 1.5;
}
.poster-template-error {
  color: #963e2f;
}
.poster-template-dialog .poster-template-download,
.poster-template-dialog .poster-template-print {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  width: 100%;
  min-height: 3.125rem;
  margin: 0.75rem 0 1rem;
  border: 0;
  border-radius: 0.75rem;
  background: #174d3d;
  color: #fffef9;
  padding: 0.875rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}
.poster-template-dialog .poster-template-download:disabled,
.poster-template-dialog .poster-template-print:disabled {
  background: #dee4d9;
  color: #6a7668;
  cursor: not-allowed;
}
.poster-template-dialog .poster-template-download svg,
.poster-template-dialog .poster-template-print svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}
.poster-template-status {
  min-height: 1.125rem;
  margin: 0;
  font-size: 0.8125rem;
  color: #176345;
}
.poster-template-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-width: 0;
  padding: 2rem;
  border-left: 1px solid #dfe4d9;
  background: #e9ecdf;
}
.poster-template-preview > svg {
  width: auto;
  max-width: 100%;
  height: min(40rem, 65dvh);
  max-height: none;
  display: block;
  box-shadow: 0 0.75rem 2rem #173f351a;
}
.poster-template-preview > p {
  margin: 0;
  color: #536151;
  font-size: 0.75rem;
}
.poster-template-dialog :is(button, input, select, summary, a):focus-visible {
  outline: 3px solid #477c5a;
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .poster-template-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 1rem;
  }
  .poster-template-heading {
    padding: 0.75rem 1rem;
  }
  .poster-template-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .poster-template-controls {
    padding: 1.25rem;
  }
  .poster-template-preview {
    grid-row: 1;
    border-left: 0;
    border-bottom: 1px solid #dfe4d9;
    padding: 1.5rem;
    gap: 0.75rem;
  }
  .poster-template-preview > svg {
    height: 19rem;
  }
  .poster-template-options {
    grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .poster-template-close,
  .poster-template-dialog .poster-template-download {
    transition: background-color 160ms ease-out;
  }
}
@media (hover: hover) {
  .poster-template-close:hover {
    background: #e9ecdf;
  }
  .poster-template-dialog .poster-template-download:not(:disabled):hover {
    background: #23614b;
  }
}

.poster-template-dialog .poster-template-print {
  margin-top: -0.25rem;
  border: 1px solid #cbd5c6;
  background: transparent;
  color: var(--poster-ink);
}
.poster-template-editing {
  margin: 1.1rem 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.poster-template-editing summary {
  display: list-item;
  min-height: 44px;
  align-content: center;
  font-weight: 600;
  cursor: pointer;
}
.poster-template-editing p {
  margin: 0.35rem 0;
  color: #56685a;
}
.poster-template-editing a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #174d3d;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.poster-template-editing p:last-child {
  margin-top: 1rem;
}
@media (hover: hover) and (pointer: fine) {
  .poster-template-dialog .poster-template-print:not(:disabled):hover {
    background: #e9ecdf;
  }
}

@media (max-width: 400px) {
  .poster-template-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
