/* Application Cost Calculator — component styles Tailwind utilities can't express.
   Colours reference the theme tokens defined in input.css. */

/* --- Stepper --- */

.step-circle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.6);
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.2);
  transition: all 0.25s ease;
}

.step-circle:hover {
  border-color: rgb(255 255 255 / 0.45);
}

.step-circle.is-active {
  background: #fff;
  border-color: #fff;
  color: var(--color-accent);
}

.step-circle.is-done {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.step-label {
  margin-top: 0.625rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.45);
  transition: color 0.25s ease;
}

.step-label.is-active {
  color: rgb(255 255 255 / 0.9);
}

.step-line {
  flex: 1;
  height: 1px;
  margin-top: 1.125rem;
  background: rgb(255 255 255 / 0.2);
  transition: background 0.25s ease;
}

.step-line.is-done {
  background: var(--color-primary);
}

/* --- Selectable cards (country, university) --- */

.select-card {
  position: relative;
  width: 100%;
  text-align: left;
  border-radius: 24px;
  border: 1px solid rgb(226 232 240 / 0.6);
  background: #fff;
  padding: 1.5rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.select-card:hover {
  border-color: color-mix(in oklab, var(--color-primary) 30%, transparent);
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.06);
  transform: translateY(-2px);
}

.select-card.is-selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.select-card.is-selected::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Course level toggle --- */

.course-btn {
  color: rgb(100 116 139);
}

.course-btn:hover {
  color: rgb(15 23 42);
}

.course-btn.is-active {
  background: var(--color-primary);
  color: #fff;
}

/* --- Employability bar --- */

.emp-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgb(241 245 249);
  overflow: hidden;
}

.emp-bar > span {
  display: block;
  height: 100%;
  border-radius: 9999px;
  background: var(--color-primary);
  transition: width 0.5s ease;
}

/* --- Living cost choices --- */

.choice-pill {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  border-radius: 18px;
  border: 1px solid rgb(226 232 240 / 0.8);
  background: #fff;
  padding: 1rem 1.125rem;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.choice-pill:hover {
  border-color: color-mix(in oklab, var(--color-primary) 35%, transparent);
}

.choice-pill:has(input:checked) {
  border-color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 5%, transparent);
}

.choice-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-dot {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  border: 1.5px solid rgb(203 213 225);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s ease;
}

.choice-pill:has(input:checked) .choice-dot {
  border-color: var(--color-primary);
}

.choice-pill:has(input:checked) .choice-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background: var(--color-primary);
}

.choice-pill input[type="checkbox"] + .choice-dot {
  border-radius: 6px;
}

.choice-pill:has(input[type="checkbox"]:checked) .choice-dot::after {
  border-radius: 2px;
}

/* --- Select fields --- */

.field-select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgb(226 232 240 / 0.8);
  background: #fff;
  padding: 0.875rem 1.125rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(15 23 42);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.125rem;
  padding-right: 2.75rem;
  cursor: pointer;
}

.field-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* --- Progress bars in the dark results panel --- */

.progress-bar {
  height: 6px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 9999px;
  background: var(--color-primary-light);
  transition: width 0.4s ease;
}

/* --- Disabled continue button --- */

.calc-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --- Entry animation --- */

@keyframes calcFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-fade-up {
  animation: calcFadeUp 0.45s ease both;
}

.anim-delay-1 {
  animation-delay: 0.05s;
}
.anim-delay-2 {
  animation-delay: 0.1s;
}
.anim-delay-3 {
  animation-delay: 0.15s;
}
.anim-delay-4 {
  animation-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .anim-fade-up,
  .select-card,
  .emp-bar > span,
  .progress-bar > span {
    animation: none;
    transition: none;
  }
}

/* --- Print --- */

@media print {
  header,
  footer,
  aside,
  #print-btn,
  #restart-btn {
    display: none !important;
  }

  .bg-accent {
    background: #fff !important;
    color: #0f172a !important;
    box-shadow: none !important;
  }
}
