/**
 * EventPrntr wizard — Bulma variable overrides and polish only.
 * Do not restyle base .button, .input, .tabs, .field, etc.
 */

:root {
  --wizard-font-body: 'Actor', sans-serif;
  --wizard-font-display: 'Doppio One', sans-serif;

  /* Calm professional blue (not purple/indigo cliché) */
  --bulma-primary-h: 204deg;
  --bulma-primary-s: 72%;
  --bulma-primary-l: 40%;
  --bulma-primary-invert-h: 0deg;
  --bulma-primary-invert-s: 0%;
  --bulma-primary-invert-l: 100%;
  --bulma-link-h: 204deg;
  --bulma-link-s: 72%;
  --bulma-link-l: 40%;
  --bulma-link-invert-l: 100%;
  --bulma-info-h: 204deg;
  --bulma-success-h: 158deg;
  --bulma-warning-h: 42deg;
  --bulma-danger-h: 0deg;

  --bulma-radius: 0.75rem;
  --bulma-radius-large: 1rem;
  --bulma-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --bulma-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --bulma-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --bulma-field-block-spacing: 1.25rem;
  --bulma-input-border-width: 1.5px;

  --wizard-page-top: hsl(204 42% 95%);
  --wizard-page-mid: hsl(210 28% 98%);
  --wizard-page-bottom: hsl(204 30% 93%);
  --wizard-dragover-bg: hsl(204deg 70% 96%);
  --wizard-file-row-bg: hsl(204deg 45% 97%);
  --wizard-preview-bg: hsl(210 14% 82%);
  --wizard-preview-stage: hsl(210 12% 72%);
  --wizard-step-line: hsl(210 12% 86%);
  --wizard-step-done: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l));
  --wizard-noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");

  --wizard-subway-label: hsl(210 10% 28%);
  --wizard-subway-hint: hsl(210 8% 48%);
  --wizard-subway-label-muted: hsl(210 8% 52%);
  --wizard-subway-label-active: hsl(var(--bulma-primary-h), var(--bulma-primary-s), 28%);
  --wizard-subway-rail: hsl(210 12% 86%);
  --wizard-subway-rail-done: hsl(var(--bulma-primary-h), var(--bulma-primary-s), 72%);
  --wizard-subway-dot-border: hsl(210 12% 78%);
  --wizard-subway-dot-bg: #fff;
  --wizard-subway-active-ring: hsl(var(--bulma-primary-h), 70%, 92%);
  --wizard-status-done-bg: hsl(158deg 45% 96%);
  --wizard-status-failed-bg: hsl(42deg 80% 95%);
}

/**
 * Ensure FA Free/Pro icon glyphs render even when host CSS is incomplete.
 */
.fa,
.fas,
.fa-solid {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", var(--fa-style-family-classic, "Font Awesome 6 Free");
  font-weight: 900;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
}

html {
  font-family: var(--wizard-font-body);
  background-color: var(--wizard-page-mid);
  background-image:
    var(--wizard-noise),
    radial-gradient(ellipse 120% 60% at 50% -10%, var(--wizard-page-top) 0%, transparent 60%),
    linear-gradient(180deg, var(--wizard-page-mid) 0%, var(--wizard-page-bottom) 100%);
  background-attachment: fixed;
  min-height: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: var(--wizard-font-body);
}

h1,
h2,
h3,
h4,
h5,
.title {
  font-family: var(--wizard-font-display);
}

html[data-theme="dark"] {
  --wizard-page-top: hsl(204 28% 16%);
  --wizard-page-mid: hsl(210 16% 10%);
  --wizard-page-bottom: hsl(204 18% 8%);
  --wizard-dragover-bg: hsl(204deg 40% 18%);
  --wizard-file-row-bg: hsl(204deg 28% 16%);
  --wizard-preview-bg: hsl(210 10% 18%);
  --wizard-preview-stage: hsl(210 10% 12%);
  --wizard-step-line: hsl(210 10% 28%);
  --wizard-subway-label: hsl(210 15% 90%);
  --wizard-subway-hint: hsl(210 10% 68%);
  --wizard-subway-label-muted: hsl(210 10% 58%);
  --wizard-subway-label-active: hsl(var(--bulma-primary-h), 70%, 78%);
  --wizard-subway-rail: hsl(210 10% 30%);
  --wizard-subway-rail-done: hsl(158deg 40% 42%);
  --wizard-subway-dot-border: hsl(210 10% 42%);
  --wizard-subway-dot-bg: hsl(210 16% 14%);
  --wizard-subway-active-ring: hsl(var(--bulma-primary-h), 40%, 22%);
  --wizard-status-done-bg: hsl(158deg 18% 13%);
  --wizard-status-failed-bg: hsl(42deg 22% 13%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --wizard-page-top: hsl(204 28% 16%);
    --wizard-page-mid: hsl(210 16% 10%);
    --wizard-page-bottom: hsl(204 18% 8%);
    --wizard-dragover-bg: hsl(204deg 40% 18%);
    --wizard-file-row-bg: hsl(204deg 28% 16%);
    --wizard-preview-bg: hsl(210 10% 18%);
    --wizard-preview-stage: hsl(210 10% 12%);
    --wizard-step-line: hsl(210 10% 28%);
    --wizard-subway-label: hsl(210 15% 90%);
    --wizard-subway-hint: hsl(210 10% 68%);
    --wizard-subway-label-muted: hsl(210 10% 58%);
    --wizard-subway-label-active: hsl(var(--bulma-primary-h), 70%, 78%);
    --wizard-subway-rail: hsl(210 10% 30%);
    --wizard-subway-rail-done: hsl(158deg 40% 42%);
    --wizard-subway-dot-border: hsl(210 10% 42%);
    --wizard-subway-dot-bg: hsl(210 16% 14%);
    --wizard-subway-active-ring: hsl(var(--bulma-primary-h), 40%, 22%);
    --wizard-status-done-bg: hsl(158deg 18% 13%);
    --wizard-status-failed-bg: hsl(42deg 22% 13%);
  }
}

body {
  min-height: 100vh;
  padding-block: 1rem;
  padding-inline: 0.75rem;
}

.wizard-topbar {
  max-width: 560px;
  margin: 0 auto 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.wizard-shell {
  max-width: 560px;
  margin-inline: auto;
  padding: 1.75rem 1.25rem 1.75rem;
  box-shadow: var(--bulma-shadow-lg);
  border: 1px solid rgb(0 0 0 / 0.04);
}

.wizard-shell.box {
  box-shadow: var(--bulma-shadow-lg);
  border-radius: var(--bulma-radius-large);
}

.wizard-shell .box,
.wizard-shell .card {
  box-shadow: none;
  border: 1px solid var(--wizard-step-line);
  border-radius: var(--bulma-radius-large);
  background-color: var(--wizard-file-row-bg);
}

.wizard-brand {
  letter-spacing: -0.035em;
  margin-bottom: 0.35rem !important;
}

.wizard-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.85rem;
  border-radius: 0.85rem;
  background: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l));
  color: #fff;
  box-shadow: var(--bulma-shadow-md);
}

.wizard-brand-mark .icon {
  font-size: 1.15rem;
}

/* Compact desktop stepper that fits the shell (6 boxed Bulma tabs overflow) */
.wizard-steps {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.35rem 0 0.15rem;
  gap: 0;
}

.wizard-steps li {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  position: relative;
}

.wizard-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.9rem;
  left: calc(50% + 1rem);
  right: calc(-50% + 1rem);
  height: 2px;
  background: var(--wizard-step-line);
  z-index: 0;
}

.wizard-steps li.is-done:not(:last-child)::after,
.wizard-steps li.is-active:not(:last-child)::after {
  background: var(--wizard-step-done);
}

.wizard-step-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  border: 2px solid var(--wizard-step-line);
  background: var(--bulma-scheme-main, #fff);
  color: hsl(210 10% 55%);
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.wizard-steps li.is-active .wizard-step-dot {
  border-color: var(--wizard-step-done);
  background: var(--wizard-step-done);
  color: #fff;
  box-shadow: 0 0 0 3px hsl(var(--bulma-primary-h), 70%, 92%);
}

.wizard-steps li.is-done .wizard-step-dot {
  border-color: var(--wizard-step-done);
  background: hsl(var(--bulma-primary-h), 70%, 96%);
  color: var(--wizard-step-done);
}

.wizard-step-caption {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: hsl(210 10% 50%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-inline: 0.1rem;
}

.wizard-steps li.is-active .wizard-step-caption {
  color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), 32%);
}

.wizard-step-mobile {
  display: block;
}

.wizard-step-desktop {
  display: none;
}

.file.is-boxed .file-cta {
  border-style: dashed;
  border-width: 2px;
  width: 100%;
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.65rem;
  padding: 1.5rem 1.25rem;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.file.is-boxed .file-label {
  width: 100%;
  justify-content: center;
}

.file.is-boxed .file-cta .file-label {
  display: block;
  width: 100%;
  text-align: center;
  white-space: normal;
  text-overflow: unset;
  overflow: visible;
  line-height: 1.35;
}

html[data-theme="dark"] .file.is-boxed .file-cta,
html[data-theme="dark"] .file.is-boxed .file-label {
  color: hsl(210 15% 88%);
}

html[data-theme="dark"] .tag.is-primary.is-light {
  background-color: hsl(204 40% 22%);
  color: hsl(204 80% 85%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .tag.is-primary.is-light {
    background-color: hsl(204 40% 22%);
    color: hsl(204 80% 85%);
  }
}

.file.is-boxed .file-icon {
  margin-inline-end: 0 !important;
  margin-bottom: 0;
}

.file.is-dragover .file-cta {
  border-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l));
  background-color: var(--wizard-dragover-bg);
  transform: scale(1.01);
}

/* Primary actions: force light text on brand blue */
.button.is-primary,
.button.is-primary:hover,
.button.is-primary:focus,
.button.is-primary.is-selected,
.buttons .button.is-primary.is-selected {
  color: #fff !important;
}

.button.is-primary .icon,
.button.is-primary.is-selected .icon {
  color: inherit;
}

.wizard-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--bulma-radius);
  background-color: var(--wizard-file-row-bg);
  box-shadow: var(--bulma-shadow-sm);
  border: 1px solid rgb(0 0 0 / 0.04);
  min-width: 0;
  overflow: hidden;
}

.wizard-file-icon {
  flex: 0 0 auto;
}

.wizard-file-meta {
  flex: 1 1 auto;
  min-width: 0;
}

.wizard-file-remove {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wizard-copies {
  display: flex;
  justify-content: center;
}

.wizard-copies .field.has-addons {
  margin-bottom: 0;
}

.wizard-copies-input {
  width: 3.5rem;
  max-width: 3.5rem;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.wizard-preview-meta {
  min-width: 0;
  max-width: 14rem;
}

.wizard-preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 400px;
  padding: 1rem;
  overflow: auto;
  border-radius: var(--bulma-radius-large);
  background-color: var(--wizard-preview-stage);
  background-image:
    linear-gradient(45deg, var(--wizard-preview-bg) 25%, transparent 25%),
    linear-gradient(-45deg, var(--wizard-preview-bg) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--wizard-preview-bg) 75%),
    linear-gradient(-45deg, transparent 75%, var(--wizard-preview-bg) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12);
}

.wizard-preview-page {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #fff;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.12),
    0 8px 24px rgb(0 0 0 / 0.18);
}

.wizard-preview-skeleton {
  position: absolute;
  inset: 1rem;
  min-height: 200px;
  border-radius: var(--bulma-radius);
}

.wizard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.wizard-actions .button {
  margin-bottom: 0 !important;
}

.wizard-panel-enter {
  animation: wizard-fade-in 0.22s ease;
}

@keyframes wizard-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.is-truncated {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.wizard-status-card {
  transition: box-shadow 0.2s ease, background-color 0.2s ease;
}

.wizard-job-summary {
  text-align: left;
  margin: 0 auto;
  max-width: 26rem;
  padding: 0.75rem 1rem;
  border-radius: var(--bulma-radius);
  background: var(--wizard-file-row-bg);
  border: 1px solid var(--wizard-step-line);
}

.wizard-job-summary-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.wizard-job-summary-main > .icon {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.wizard-job-summary-text {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.wizard-job-summary-file {
  font-family: var(--wizard-font-display);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--bulma-text-strong, hsl(210 12% 18%));
  font-weight: 400;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wizard-job-summary-printer {
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--bulma-text, hsl(210 10% 32%));
}

html[data-theme="dark"] .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-label,
html[data-theme="dark"] .wizard-status-card.is-status-done .wizard-subway-label {
  color: hsl(158 25% 88%);
}

html[data-theme="dark"] .wizard-status-card.is-status-done .wizard-subway-hint {
  color: hsl(158 12% 66%);
}

html[data-theme="dark"] .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-dot {
  border-color: hsl(158deg 45% 48%);
  background: hsl(158deg 45% 48%);
}

html[data-theme="dark"] .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-rail {
  background: hsl(158deg 35% 38%);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-label,
  html:not([data-theme="light"]) .wizard-status-card.is-status-done .wizard-subway-label {
    color: hsl(158 25% 88%);
  }

  html:not([data-theme="light"]) .wizard-status-card.is-status-done .wizard-subway-hint {
    color: hsl(158 12% 66%);
  }

  html:not([data-theme="light"]) .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-dot {
    border-color: hsl(158deg 45% 48%);
    background: hsl(158deg 45% 48%);
  }

  html:not([data-theme="light"]) .wizard-status-card.is-status-done .wizard-subway li.is-done .wizard-subway-rail {
    background: hsl(158deg 35% 38%);
  }
}

.wizard-status-card.is-status-done {
  background: var(--wizard-status-done-bg);
}

.wizard-status-card.is-status-failed {
  background: var(--wizard-status-failed-bg);
}

.wizard-subway {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0;
  position: relative;
}

.wizard-subway li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  min-height: 3.1rem;
  padding-bottom: 0.85rem;
}

.wizard-subway li:last-child {
  padding-bottom: 0;
  min-height: 0;
}

.wizard-subway-rail {
  position: absolute;
  left: 0.7rem;
  top: 1.4rem;
  bottom: -0.15rem;
  width: 2px;
  background: var(--wizard-subway-rail);
}

.wizard-subway li:last-child .wizard-subway-rail {
  display: none;
}

.wizard-subway li.is-done .wizard-subway-rail,
.wizard-subway li.is-active .wizard-subway-rail {
  background: var(--wizard-subway-rail-done);
}

.wizard-subway-dot {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  border: 2px solid var(--wizard-subway-dot-border);
  background: var(--wizard-subway-dot-bg);
  flex-shrink: 0;
  margin-top: 0.1rem;
  z-index: 1;
  box-sizing: border-box;
}

.wizard-subway li.is-active .wizard-subway-dot {
  border-color: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l));
  background: hsl(var(--bulma-primary-h), var(--bulma-primary-s), var(--bulma-primary-l));
  box-shadow: 0 0 0 4px var(--wizard-subway-active-ring);
}

.wizard-subway li.is-done .wizard-subway-dot {
  border-color: hsl(158deg 50% 40%);
  background: hsl(158deg 50% 40%);
}

.wizard-subway li.is-failed .wizard-subway-dot {
  border-color: hsl(42deg 90% 42%);
  background: hsl(42deg 90% 42%);
}

.wizard-subway-copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-top: 0.05rem;
}

.wizard-subway-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wizard-subway-label);
  line-height: 1.25;
}

.wizard-subway-hint {
  font-size: 0.8rem;
  color: var(--wizard-subway-hint);
  line-height: 1.3;
}

.wizard-subway li.is-active .wizard-subway-label {
  color: var(--wizard-subway-label-active);
}

.wizard-subway li:not(.is-active):not(.is-done):not(.is-failed) .wizard-subway-label {
  font-weight: 500;
  color: var(--wizard-subway-label-muted);
}

#stepper.is-complete .wizard-step-mobile,
#stepper.is-complete .wizard-step-desktop {
  display: none !important;
}

@media screen and (max-width: 420px) {
  .wizard-file-row {
    flex-wrap: wrap;
  }

  .wizard-file-remove {
    margin-left: auto;
  }

  .wizard-preview-meta {
    max-width: 10rem;
  }
}

@media screen and (min-width: 768px) {
  body {
    padding-block: 2rem;
  }

  .wizard-shell {
    padding: 2.35rem 2rem 2.35rem;
  }

  .wizard-step-mobile {
    display: none;
  }

  .wizard-step-desktop {
    display: block;
  }

  .wizard-steps {
    display: flex;
  }

  .wizard-actions {
    flex-direction: row;
    gap: 0.85rem;
  }

  .wizard-actions .button {
    flex: 1 1 0;
  }

  .wizard-actions .button.is-primary {
    flex: 1.35 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .file.is-boxed .file-cta,
  .wizard-panel-enter {
    transition: none;
    animation: none;
    transform: none;
  }
}
