.tshirt-formats-header,
.tshirt-formats-menu {
  display: none;
}

.tshirt-formats-route {
  --tshirt-formats-width: 680px;
  --tshirt-formats-gutter: clamp(12px, 3.2vw, 24px);
  --tshirt-formats-accent: var(--lime);
}

[data-theme="light"] .tshirt-formats-route {
  --tshirt-formats-accent: #506800;
}

.tshirt-formats-route > .app-header {
  display: grid;
  grid-template-columns: 36px auto minmax(0, 1fr) 44px;
  height: auto;
  min-height: calc(54px + env(safe-area-inset-top));
  gap: 6px;
  border-bottom: 0;
  padding: calc(4px + env(safe-area-inset-top)) max(var(--tshirt-formats-gutter), env(safe-area-inset-right), calc((100% - var(--tshirt-formats-width)) / 2)) 4px max(var(--tshirt-formats-gutter), env(safe-area-inset-left), calc((100% - var(--tshirt-formats-width)) / 2));
}

.tshirt-formats-route .app-header .brand,
.tshirt-formats-route .header-context {
  display: none;
}

.tshirt-formats-route .tshirt-formats-header {
  display: contents;
}

.tshirt-formats-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.tshirt-formats-back svg {
  width: 21px;
  height: 21px;
}

#tshirtFormatsTitle {
  font-size: clamp(20px, 5.85vw, 28px);
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: -.025em;
}

.tshirt-formats-route .header-actions {
  grid-column: 4;
  gap: 1px;
}

.tshirt-formats-route .tshirt-formats-menu {
  position: relative;
  display: block;
}

.tshirt-formats-menu > summary {
  list-style: none;
  cursor: pointer;
}

.tshirt-formats-menu > summary::-webkit-details-marker {
  display: none;
}

.tshirt-formats-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 162px;
  max-width: calc(100vw - 24px);
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 12px 28px #0004;
}

.tshirt-formats-menu:not([open]) > .tshirt-formats-menu-panel {
  display: none;
}

.tshirt-formats-menu-panel > a,
.tshirt-formats-menu-panel .icon-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}

.tshirt-formats-menu-panel > a:hover {
  background: var(--surface-soft);
}

.tshirt-formats-menu-panel .header-action-label {
  display: inline;
}

.tshirt-formats-menu-panel .icon-button svg {
  width: 17px;
  height: 17px;
}

.tshirt-formats-route main {
  width: 100%;
  min-width: 0;
  max-width: calc(var(--tshirt-formats-width) + 2 * var(--tshirt-formats-gutter));
  padding: 6px var(--tshirt-formats-gutter) 24px;
}

.tshirt-formats-back:hover,
.tshirt-formats-event:hover {
  background: var(--surface-soft);
}

.tshirt-formats-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-self: end;
  gap: 5px;
  min-height: 44px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: var(--surface);
  font-size: clamp(12px, 3.25vw, 14px);
  font-weight: 570;
  line-height: 1.25;
  text-align: left;
}

.tshirt-format-event-icon {
  color: var(--muted);
}

.tshirt-format-event-label {
  min-width: 0;
  text-wrap: balance;
}

.tshirt-format-event-icon {
  width: 16px;
  height: 16px;
}

.tshirt-formats-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.tshirt-format-option {
  container-type: inline-size;
  position: relative;
  display: grid;
  min-width: 0;
  padding: clamp(10px, 3vw, 16px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card-surface);
}

.tshirt-format-visual {
  position: relative;
  display: block;
  min-width: 0;
}

.tshirt-format-open::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.tshirt-process-carousel {
  position: relative;
  z-index: 2;
}

.tshirt-process-strip {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.tshirt-process-strip::-webkit-scrollbar { display: none; }

.tshirt-process-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  scroll-snap-align: start;
}

.tshirt-process-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: start end;
  min-width: 44px;
  min-height: 44px;
  padding: 7px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
}

.tshirt-process-toggle > span {
  padding: 2px 7px;
  border-radius: 12px;
  background: rgb(16 18 22 / 80%);
  font: 600 10px/1.4 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}


.tshirt-format-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  margin-bottom: 9px;
}

.tshirt-format-title {
  flex: 1 1 max-content;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  font-size: clamp(20px, 5.45vw, 26px);
  line-height: 1.17;
  font-weight: 760;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.tshirt-format-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  margin-bottom: 8px;
}

.tshirt-format-choices {
  position: relative;
  z-index: 2;
  flex: 0 1 auto;
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  gap: 4px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}
.tshirt-format-project-prefix { flex: none; }
.tshirt-format-project-value { min-width: 0; overflow-wrap: anywhere; }
.tshirt-format-choices > svg {
  align-self: center;
  width: 12px;
  height: 12px;
  transform: rotate(90deg);
}
.tshirt-format-choices.has-project-options { cursor: pointer; }
.tshirt-format-choices:focus-within {
  outline: 2px solid var(--muted);
  outline-offset: 5px;
  border-radius: 3px;
}
.tshirt-format-project-select {
  position: absolute;
  z-index: 1;
  inset: -10px 0;
  width: 100%;
  height: calc(100% + 20px);
  min-height: 44px;
  margin: 0;
  padding: 0;
  opacity: 0;
  font-size: 16px;
  cursor: pointer;
}
.tshirt-format-option [hidden] { display: none; }

.tshirt-format-step {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: clamp(12px, 3.2vw, 14px);
  line-height: 1.25;
  text-align: left;
}

.tshirt-format-step > figcaption {
  position: absolute;
  z-index: 2;
  left: 7px;
  bottom: 7px;
  max-width: calc(100% - 14px);
  padding: 3px 7px;
  border-radius: 8px;
  background: rgb(15 18 22 / 74%);
  pointer-events: none;
}

.tshirt-format-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-soft);
}

.tshirt-format-preview {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tshirt-format-result .tshirt-format-preview {
  object-position: center 42%;
}

/* Indoor event shots need a softer contrast curve than the finished artwork. */
.tshirt-format-preview:not(.is-illustrated) {
  filter: var(--photo-finish, brightness(1.045) contrast(.98) saturate(.98));
}
[aria-labelledby="tshirt-format-text"],
[aria-labelledby="tshirt-format-workshop"],
[aria-labelledby="tshirt-format-collective-design"] {
  --photo-finish: brightness(1.085) contrast(.96) saturate(.96);
}
[aria-labelledby="tshirt-format-children-custom"] {
  --photo-finish: brightness(1.055) contrast(.985) saturate(.9);
}
[aria-labelledby="tshirt-format-design-studio"],
[aria-labelledby="tshirt-format-ai"] {
  --photo-finish: none;
}

.tshirt-format-description {
  margin-bottom: 2px;
  font-size: clamp(14px, 3.7vw, 16px);
  line-height: 1.35;
}

.tshirt-format-project {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: clamp(12px, 3.25vw, 14px);
  line-height: 1.25;
}

.tshirt-format-project svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.tshirt-format-project:is(:hover,:focus-visible) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tshirt-diagram {
  width: clamp(52px, 17vw, 78px);
  height: auto;
  color: var(--muted);
  stroke-width: 1.5;
}

.tshirt-diagram-outline {
  stroke-width: 1.9;
  fill: color-mix(in srgb, var(--tshirt-formats-accent) 5%, transparent);
}

.tshirt-format-result .tshirt-diagram-mark {
  color: var(--tshirt-formats-accent);
  stroke-width: 2;
}

.tshirt-format-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.tshirt-format-quote {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tshirt-format-price {
  font-size: clamp(18px, 5.7cqi, 24px);
  line-height: 1.12;
  font-weight: 760;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

.tshirt-format-quantity {
  color: var(--muted);
  font-size: clamp(12px, 3.25vw, 14px);
  line-height: 1.25;
}

.tshirt-format-actions {
  display: flex;
  gap: 6px;
}

.tshirt-format-actions :is(.tshirt-format-configure, .tshirt-format-add) {
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
}

.tshirt-format-actions .tshirt-format-configure {
  flex: 0 0 44px;
  width: 44px;
  padding-inline: 0;
  border-color: var(--line-soft);
  background: transparent;
  color: var(--ink);
}

.tshirt-format-configure-label { display: none; }
.tshirt-format-actions .tshirt-format-add { min-width: 120px; }

.tshirt-format-actions .tshirt-format-configure:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.tshirt-format-actions svg {
  width: 16px;
  height: 16px;
}

.tshirt-format-actions .tshirt-format-configure svg {
  width: 20px;
  height: 20px;
}

.tshirt-format-option[data-selected="true"] .tshirt-format-add {
  border-color: color-mix(in srgb, var(--tshirt-formats-accent) 35%, var(--line));
  background: color-mix(in srgb, var(--tshirt-formats-accent) 11%, var(--surface));
  color: var(--tshirt-formats-accent);
}

.tshirt-format-option[data-selected="true"] .tshirt-format-add:hover {
  background: color-mix(in srgb, var(--tshirt-formats-accent) 18%, var(--surface));
}

@container (max-width: 300px) {
  .tshirt-format-actions .tshirt-format-add { min-width: 96px; padding-inline: 8px; font-size: 12px; }
  .tshirt-format-title { font-size: 20px; }
}

.tshirt-formats-route.has-selection-dock .tshirt-format-option,
.tshirt-formats-route.has-selection-dock .tshirt-formats-portfolio {
  scroll-margin-bottom: calc(var(--selection-bar-height, 80px) + 24px + env(safe-area-inset-bottom));
}

.tshirt-formats-route #selectionBar {
  max-width: var(--tshirt-formats-width);
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 14px;
}

.tshirt-formats-route #selectionBar .live-budget,
.tshirt-formats-route #selectionBar .selection-budget-help {
  display: none;
}

[data-theme="dark"] .tshirt-formats-route #selectionBar {
  --muted: #c1cbd0;
}

[data-theme="dark"] .tshirt-formats-route #selectionBar[data-state="none"] {
  background: linear-gradient(115deg, #192729, #1b3438);
}

.tshirt-formats-route #selectionBar .selection-amount {
  font-size: clamp(20px, 5.2vw, 28px);
}

.tshirt-formats-route #selectionBar .primary {
  min-height: 44px;
  padding: 7px 12px;
  font-size: clamp(13px, 3.6vw, 16px);
}

@media (max-width: 759px) {
  .tshirt-formats-route {
    --header-height: 54px;
    --selection-dock-bottom: 0px;
  }

  .tshirt-formats-route #selectionBar {
    left: env(safe-area-inset-left);
    right: env(safe-area-inset-right);
    max-width: none;
    padding-bottom: max(9px, env(safe-area-inset-bottom));
    border-radius: 15px 15px 0 0;
  }
}

@media (max-width: 999px) {
  .tshirt-formats-route > .site-menu-wrap { display: none; }
}

@media (max-width: 359px) {
  .tshirt-formats-route { --tshirt-formats-gutter: 10px; }
  .tshirt-formats-route > .app-header { grid-template-columns: 32px auto minmax(0, 1fr) 36px; gap: 3px; }
  .tshirt-formats-back { width: 32px; }
  .tshirt-formats-route .header-actions .icon-button { width: 36px; min-width: 36px; flex-basis: 36px; padding-inline: 7px; }
  .tshirt-formats-event { grid-template-columns: minmax(0, 1fr); padding-inline: 5px; font-size: 12px; }
  .tshirt-formats-event .tshirt-format-event-icon { display: none; }
}

@media print {
  .tshirt-formats-event,
  .tshirt-format-actions {
    display: none;
  }

  .tshirt-format-option {
    break-inside: avoid;
  }
}

.tshirt-format-vat {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
