/* Course Creator wizard — page-scoped styles. Layout primitives live in Tailwind;
   this file holds only rules that need pseudo-elements, state selectors,
   responsive overrides, or brand-specific design that doesn't snap to Tailwind.

   Text, paragraphs, form inputs, and form labels inherit the project body font
   (set in layout.css preflight) and use Tailwind's standard font-size scale. */

.course-creator-page {
  background: #f6f8fc;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  /* Shared by .course-creator-grid and the footer so the footer's action
     buttons can align with the right edge of the main content column. */
  --cc-aside-width: 280px;
  --cc-grid-gap: 40px;
}

/* The wizard form is the page's only child; make it a full-height flex
   column so .course-creator-wizard-container (flex: 1) can grow and push
   the footer to the bottom of the page when content is short. */
.course-creator-page > form {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---------- Step indicator ---------- */

.course-creator-step-indicator {
  background: #fff;
  border-bottom: 1px solid #edf2fe;
  padding: 16px 32px;
}

.course-creator-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #777e8b;
  flex: 1;
  position: relative;
}

.course-creator-step:not(:last-child)::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
  margin: 0 8px;
}

.course-creator-step.is-complete:not(:last-child)::after,
.course-creator-step.is-active:not(:last-child)::after {
  background: #2964ae;
}

.course-creator-step-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #777e8b;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.course-creator-step.is-complete .course-creator-step-bubble {
  background: #2964ae;
  border-color: #2964ae;
  color: #fff;
}

.course-creator-step.is-active .course-creator-step-bubble {
  background: #edf2fe;
  border-color: #2964ae;
  color: #2964ae;
}

.course-creator-step.is-active .course-creator-step-label,
.course-creator-step.is-complete .course-creator-step-label {
  color: #1d2939;
}

.course-creator-step.is-active .course-creator-step-label {
  font-weight: 600;
}

/* ---------- Wizard container ---------- */

.course-creator-wizard-container {
  flex: 1;
  /*max-width: 1100px;*/
  width: 100%;
  margin: 0 auto;
  padding: 32px 32px 48px;
}

.course-creator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cc-aside-width);
  gap: var(--cc-grid-gap);
  align-items: start;
}

.course-creator-header {
  margin-bottom: 24px;
}

.course-creator-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: #1d2939;
  margin: 0;
  letter-spacing: -0.01em;
}

.course-creator-header p {
  font-size: 0.875rem;
  color: #5d646c;
  margin: 6px 0 0;
  line-height: 1.6;
  max-width: 640px;
}

.course-creator-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1d2939;
  margin-bottom: 6px;
}

/* ---------- Tags input ---------- */

.course-creator-tags {
  min-height: 44px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  transition: border-color 120ms;
}

.course-creator-tags:focus-within {
  border-color: #2964ae;
}

.course-creator-tags-input {
  flex: 1;
  min-width: 120px;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  color: #1d2939;
  padding: 4px 0;
}

.course-creator-tags-input::placeholder {
  color: #777e8b;
}

/* Tag pills are injected by tags_input_controller.js, so the class names
   are referenced from JavaScript, not from the view templates. */
.course-creator-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #edf2fe;
  color: #2964ae;
  border: 1px solid #c8d8f5;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.course-creator-tag-pill-remove {
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.7;
}

.course-creator-tag-pill:hover .course-creator-tag-pill-remove {
  opacity: 1;
}

/* ---------- Thumbnail dropzone ---------- */

.course-creator-thumbnail-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: stretch;
}

.course-creator-thumbnail-preview {
  aspect-ratio: 4 / 3;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f4f4f5;
}

.course-creator-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-creator-thumbnail-dropzone {
  border: 2px dashed #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 120ms;
  text-align: center;
}

.course-creator-thumbnail-dropzone:hover {
  border-color: #2964ae;
  background: #f4f8ff;
}

.course-creator-thumbnail-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: #f4f4f5;
  border-radius: 9999px;
  border: 0;
  cursor: pointer;
}

.course-creator-thumbnail-clear:hover {
  background: #e5e7eb;
}

/* ---------- Locale pills ---------- */

.course-creator-locale-pill {
  padding: 6px 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #1d2939;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 120ms;
}

.course-creator-locale-pill:hover,
.course-creator-exp-card:hover {
  border-color: #cbd5e1;
}

.course-creator-locale-pill.is-selected,
.course-creator-locale-pill:has(.course-creator-locale-checkbox:checked) {
  border-color: #2964ae;
  background: #edf2fe;
  color: #2964ae;
}

.course-creator-locale-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Tips aside ---------- */

.course-creator-aside {
  position: sticky;
  top: 24px;
}

.course-creator-tips {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 18px;
}

.course-creator-tips-divider {
  border: 0;
  height: 1px;
  background: #edf2fe;
  margin: 14px -18px;
}

/* ---------- Footer ---------- */

.course-creator-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #fff;
  border-top: 1px solid #edf2fe;
  padding: 14px 32px;
  /* Pull the Back/Continue group left so it lines up with the right edge of
     .course-creator-main (the 1fr column), clearing the gap + aside width. */
  padding-right: calc(32px + var(--cc-grid-gap) + var(--cc-aside-width));
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Modules: icon buttons ---------- */

.course-creator-icon-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  color: #5d646c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.course-creator-icon-btn:hover {
  background: #edf2fe;
  color: #1d2939;
}

/* ---------- Config: radio cards, toggle, exp cards ---------- */

.course-creator-exp-card.is-selected {
  border-color: #2964ae;
  background: #f4f8ff;
}

.course-creator-exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.course-creator-exp-card {
  padding: 14px 12px;
  text-align: center;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #1d2939;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 120ms;
}

.course-creator-exp-card.is-selected {
  color: #2964ae;
}

/* ---------- Review cards ---------- */

.course-creator-review-card {
  background: #fff;
  border: 1px solid #edf2fe;
  border-radius: 12px;
}

.course-creator-review-head {
  padding: 14px 18px;
  border-bottom: 1px solid #edf2fe;
  display: flex;
  align-items: center;
}

.course-creator-review-head h3 {
  font-weight: 600;
  font-size: 1rem;
  color: #1d2939;
  margin: 0;
  flex: 1;
}

.course-creator-review-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed #edf2fe;
}

.course-creator-review-row:last-child {
  border-bottom: 0;
}

.course-creator-review-modules {
  margin: 0;
  padding-left: 22px;
}

.course-creator-review-modules li {
  font-size: 0.875rem;
  color: #1d2939;
  padding: 4px 0;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .course-creator-step-indicator {
    padding: 12px 16px;
  }

  .course-creator-step-label {
    display: none;
  }

  .course-creator-wizard-container {
    padding: 20px 16px 32px;
  }

  .course-creator-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .course-creator-aside {
    position: static;
  }

  .course-creator-header h2 {
    font-size: 22px;
  }

  .course-creator-footer {
    padding: 12px 16px;
  }

  .course-creator-exp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .course-creator-review-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.course-creator-resume-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #dbeafe;
  background-color: #f7faff;
  border-radius: 0.5rem;
}

.course-creator-resume-banner-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.course-creator-resume-banner-text strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground, #0f172a);
}

.course-creator-resume-banner-text span {
  font-size: 0.85rem;
  color: var(--muted-foreground, #64748b);
}
