/* Make it yours: the dialog's paper, its class picker, chips, and the
   painted buttons inside it. One sheet for the yard and the home page
   (the flow itself is /shared/make-it-yours.js). Moved out of
   screens/library/styles.css on 2026-09-07, with more air: a wider paper
   and room between the parts (owner's call). */

/* Painted pieces inside the dialog (the yard paints its card actions the
   same way in its own sheet). */
/* :where() keeps these at one class of specificity, so the door paints in
   make-it-yours-doors.css (two classes) still win whatever the sheet order. */
:where(.template-picker-modal) .recipe-cancel-btn,
:where(.template-picker-modal) .recipe-create-btn,
:where(.template-picker-modal) .class-line-change {
  border: none;
  text-decoration: none;
  background: var(--t-paper, #FDF9F0);
  color: var(--t-ink, #2A2620);
  box-shadow: 0 3px 4px rgba(50, 35, 15, 0.20);
  padding: 8px 14px 9px;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transform: rotate(var(--rot, 0deg));
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

:where(.template-picker-modal) .recipe-cancel-btn:hover,
:where(.template-picker-modal) .recipe-create-btn:hover:not(:disabled),
:where(.template-picker-modal) .class-line-change:hover {
  transform: rotate(var(--rot, 0deg)) translateY(-4px);
  color: var(--t-ink, #2A2620);
}

/* ── Customize dialog (shared/dialog.js + library.js) ── */
.template-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 38, 32, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Above the home page's activity popup (1200), which opens this. */
  z-index: 1300;
}

.template-picker-modal {
  background: var(--t-paper, #FDF9F0);
  box-shadow: 0 12px 24px rgba(42, 38, 32, 0.30);
  padding: 40px 46px 38px;
  max-width: 760px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative; /* anchors the dialog × */
}

.dialog-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--t-gesso, #F2EEE5);
  box-shadow: 0 2px 3px rgba(50, 35, 15, 0.20);
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--t-ink, #2A2620);
  cursor: pointer;
  z-index: 2;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dialog-close-btn:hover { transform: translateY(-2px); }

.template-picker-title {
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.14;
  color: var(--t-ink, #2A2620);
  margin-bottom: 12px;
}

.template-picker-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--t-muted, #6B6250);
  line-height: 1.55;
  margin-bottom: 22px;
}

.recipe-form-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.recipe-cancel-btn {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 10px 18px;
}

.recipe-create-btn {
  background: var(--t-red, #E5482B);
  color: var(--t-paper, #FDF9F0);
  --rot: -0.8deg;
  clip-path: polygon(2% 8%, 98% 0, 100% 90%, 0 100%);
  padding: 10px 24px 12px;
}

.recipe-create-btn:hover:not(:disabled) { color: var(--t-paper, #FDF9F0); }

.recipe-create-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Room between the questions, and before the doors. */
.template-picker-modal .customize-questions > * + * {
  margin-top: 20px;
}

.template-picker-modal .make-it-yours-doors {
  margin-top: 30px;
}

/* The class picker inside Make it yours: one folded line when a class is
   saved ("Your class  Middle school, Science  Change"), the chip rows
   when open. */
.class-picker {
  margin: 18px 0 26px;
  padding: 16px 18px 18px;
  background: rgba(50, 35, 15, 0.04);
  box-shadow: 0 0 0 1px rgba(50, 35, 15, 0.12);
}

.class-picker-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.class-picker-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
}

.class-picker-summary {
  flex: 1;
  min-width: 160px;
  font-weight: 700;
  color: var(--t-ink, #2A2620);
}

.class-picker-summary.class-picker-empty {
  font-weight: 500;
  color: var(--t-muted, #6B6250);
}

/* The picker's Done / Change: a small painted piece in body type. */
.class-picker .class-line-change {
  font-family: var(--t-body, 'DM Sans', Arial, sans-serif);
  font-weight: 700;
  font-size: 12px;
  padding: 5px 12px 6px;
  text-transform: none;
  letter-spacing: 0;
}

.class-picker-body[hidden] { display: none; }

.class-picker-hint {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--t-muted, #6B6250);
}

/* While fresh questions are on their way the old ones fade, so nobody
   answers a question that is about to change. */
.customize-questions-stale { opacity: 0.45; pointer-events: none; }

.class-picker-body .teacher-setup-label:first-child { margin-top: 8px; }

.teacher-setup-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  margin: 12px 0 8px;
}

.teacher-setup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.setup-chip {
  border: none;
  background: var(--t-paper, #FDF9F0);
  box-shadow: 0 3px 4px rgba(50, 35, 15, 0.18);
  padding: 8px 14px 10px;
  font-family: var(--t-display, 'Bricolage Grotesque', sans-serif);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--t-muted-caps, #8A7B62);
  cursor: pointer;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1);
}

.setup-chip:nth-child(odd) { transform: rotate(-0.7deg); }
.setup-chip:nth-child(even) { transform: rotate(0.6deg); }

.setup-chip:nth-child(odd):hover { transform: rotate(-0.7deg) translateY(-4px); }
.setup-chip:nth-child(even):hover { transform: rotate(0.6deg) translateY(-4px); }

.setup-chip.active {
  background: var(--t-yellow, #FFC800);
  background-image: var(--t-grain);
  color: var(--t-ink, #2A2620);
}

.teacher-setup-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}
