@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;600;700&family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --mov-font: "Oswald", Arial, sans-serif;
  --mov-font-text: "Roboto", Arial, sans-serif;
  --mov-primary: #e51400;
  --mov-black: #252525;
  --mov-alt: #bdbdbd;
  --mov-error: #c0392b;
  --mov-bg: #ffffff;
  --mov-succ-color: #43a047;

  /* Stepper state colors */
  --mov-progress: #4641e9;
}

a {
  text-decoration: unset;
}

.mov-form-wrapper {
  font-family: var(--mov-font);
  color: var(--mov-black);
}

/* Sizing reset within MOV forms to prevent overflow */
.mov-form,
.mov-form * {
  box-sizing: border-box;
  min-width: 0;
}

.mov-form {
  background: var(--mov-bg);
  padding: 20px;
  border: 1px solid var(--mov-alt);
  border-radius: 8px;
}

.mov-form__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

/* Column widths */
.mov-form__col {
  box-sizing: border-box;
  min-width: 0;
  margin-bottom: 10px;
}
.mov-form__col--1-1 {
  flex: 0 0 100%;
  max-width: 100%;
}
.mov-form__col--1-2 {
  flex: 0 0 calc(50% - 5px);
  max-width: calc(50% - 5px);
}
/* Three columns (accounts for two gaps of 10px) */
.mov-form__col--1-3 {
  flex: 0 0 calc((100% - 20px) / 3);
  max-width: calc((100% - 20px) / 3);
}

/* Responsive */
@media (max-width: 720px) {
  .mov-form__col--1-2,
  .mov-form__col--1-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Labels, inputs */
.mov-field__label {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--mov-black);
}
.mov-req {
  color: var(--mov-primary);
  margin-left: 4px;
}

.mov-input:not(.ts-wrapper) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--mov-alt);
  border-radius: 6px;
  background: #fff;
  color: var(--mov-black);
  outline: none;
  display: block;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mov-input:focus {
  border-color: var(--mov-primary);
  box-shadow: 0 0 0 3px rgba(229, 20, 0, 0.1);
}
.mov-input::placeholder {
  color: var(--mov-alt);
}

.mov-input--textarea {
  min-height: 140px;
  line-height: 1.4;
  resize: vertical;
}

/* Tom Select tweaks */
.ts-wrapper {
  width: 100%;
}
.ts-wrapper.single .ts-control,
.ts-wrapper.multi .ts-control {
  border: 1px solid var(--mov-alt);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.ts-wrapper.single.focus .ts-control,
.ts-wrapper.multi.focus .ts-control {
  border-color: var(--mov-primary);
  box-shadow: 0 0 0 3px rgba(229, 20, 0, 0.1);
}

/* Checkbox */
.mov-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.mov-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--mov-primary);
}

/* File input */
.mov-input--file {
  border: 1px dashed var(--mov-alt);
  padding: 12px;
  background: #fff;
}
.mov-input--file:focus {
  border-color: var(--mov-primary);
  box-shadow: 0 0 0 3px rgba(229, 20, 0, 0.1);
}

/* Helper text and tooltips */
.mov-field__description {
  display: block;
  margin-top: 6px;
  color: var(--mov-alt);
  font-size: 0.9rem;
}
.mov-field__tip {
  margin-top: 6px;
  color: var(--mov-alt);
  font-size: 0.9rem;
}

/* Errors */
.mov-form__errors--global {
  border: 1px solid var(--mov-error);
  background: #fdecea;
  color: var(--mov-error);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.mov-field__errors {
  margin: 8px 0 0 0;
  padding-left: 18px;
  color: var(--mov-error);
}
.mov-field__errors li {
  list-style: disc;
}

/* Buttons */
.mov-form__actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

button.mov-btn.mov-btn--primary.mov-btn--submit {
  background: var(--mov-primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
}

.mov-btn {
  font-family: var(--mov-font);
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.3s ease,
    background-color 0.3s ease, color 0.3s ease;
}
.mov-btn--primary {
  background: var(--mov-primary);
  color: #fff;
  border: 0;
}
.mov-btn--primary:hover,
.mov-stepper__prev.mov-btn:hover,
.mov-stepper__next.mov-btn:hover {
  background: var(--mov-black);
  color: #fff;
}
.mov-btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.mov-btn:active {
  transform: translateY(1px);
}
.mov-btn:disabled,
.mov-btn[disabled] {
  background: rgba(229, 20, 0, 0.5);
  color: #fff;
  cursor: not-allowed;
  box-shadow: none;
}

.mov-stepper__next.mov-btn {
  background: var(--mov-primary);
  color: #fff;
  border: 0;
  border-radius: 8px;
}

.mov-stepper__prev.mov-btn {
  background-color: var(--mov-black);
  color: white;
  border: 0;
  border-radius: 8px;
}

.mov-form__hidden {
  display: none;
}

.ts-wrapper .ts-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  overflow: hidden;
}

.ts-wrapper .ts-control input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important; /* Tom Select may set wide widths; constrain within flex */
  max-width: 100%;
}

/* Checkbox group (taxonomy-driven) */
.mov-field--checkboxes .mov-checkbox-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  max-height: 400px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--mov-alt);
  border-radius: 6px;
  background: #fff;
}

@media (max-width: 720px) {
  .mov-field--checkboxes .mov-checkbox-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Material-like custom checkbox */
.mov-field--checkboxes .mov-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-height: 28px;
}

/* Hide native box but keep accessible */
.mov-field--checkboxes .mov-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

/* Label text with custom box */
.mov-field--checkboxes .mov-checkbox__label {
  position: relative;
  padding-left: 28px;
  color: var(--mov-black);
  line-height: 1.2;
}

/* Box */
.mov-field--checkboxes .mov-checkbox__label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid var(--mov-alt);
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.12s ease, background 0.12s ease,
    box-shadow 0.2s ease;
}

/* Checkmark */
.mov-field--checkboxes
  .mov-checkbox
  input[type="checkbox"]:checked
  + .mov-checkbox__label::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-60%) rotate(45deg);
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
}

/* Checked state colors */
.mov-field--checkboxes
  .mov-checkbox
  input[type="checkbox"]:checked
  + .mov-checkbox__label::before {
  background: var(--mov-primary);
  border-color: var(--mov-primary);
}

/* Hover/focus affordances */
.mov-field--checkboxes .mov-checkbox:hover .mov-checkbox__label::before {
  border-color: var(--mov-primary);
}

.mov-field--checkboxes
  .mov-checkbox
  input[type="checkbox"]:focus-visible
  + .mov-checkbox__label::before {
  box-shadow: 0 0 0 3px rgba(229, 20, 0, 0.2);
}

/* Media field UI */
.mov-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mov-media__preview {
  position: relative;
  border: 1px solid var(--mov-alt);
  border-radius: 6px;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  padding: 0;
}
.mov-media__preview img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  object-fit: cover;
}

.mov-media__preview button {
  background-color: var(--mov-bg);
  color: var(--mov-black);
  border: none !important;
  padding: 2px 6px;
  text-align: center;
  line-height: 0;
  font-size: 1.6rem;
}

.mov-media__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(37, 37, 37, 0.75);
  color: #fff;
  border: none;
  border-radius: 16px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  line-height: 24px;
  text-align: center;
}
.mov-media__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mov-media__placeholder {
  color: var(--mov-alt);
  font-size: 0.95rem;
}

/* Character counter */
.mov-counter {
  margin-top: 6px;
  font-size: 0.9rem;
  line-height: 1.2;
  text-align: right;
  color: var(--mov-alt);
}
.mov-counter.is-below {
  color: var(--mov-error);
}
.mov-counter.is-ok {
  color: #43a047; /* green */
}

/* Instructor two-column preview layout */
.mov-instr-layout {
  display: flex;
  --mov-instr-gap: 16px;
  gap: var(--mov-instr-gap);
  align-items: flex-start;
  position: relative;
}
.mov-instr-layout__col {
  box-sizing: border-box;
  min-width: 0;
}
.mov-instr-layout__col--form {
  /* Account for single gap between two columns so total stays within 100% */
  flex: 0 0 calc(70% - (var(--mov-instr-gap) / 2));
  max-width: calc(70% - (var(--mov-instr-gap) / 2));
}
.mov-instr-layout__col--preview {
  /* Account for single gap between two columns so total stays within 100% */
  flex: 0 0 calc(30% - (var(--mov-instr-gap) / 2));
  max-width: calc(30% - (var(--mov-instr-gap) / 2));
}

/* Preview card */
.mov-instr-card {
  border: 1px solid var(--mov-alt);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: var(--mov-black);
}

/* Cover area */
.mov-instr-card__cover {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: visible;
}
.mov-instr-card__cover-fallback {
  width: 100%;
  height: 100%;
  background: var(--mov-primary);
}
.mov-instr-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Avatar overlapping bottom center of cover */
.mov-instr-card__avatar-wrap {
  position: absolute;
  left: 50%;
  bottom: -64px; /* half avatar height to overlap */
  transform: translateX(-50%);
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 4px solid #fff;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.mov-instr-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body */
.mov-instr-card__body {
  padding: 80px 16px 16px; /* top padding accounts for avatar overlap */
  text-align: center;
}
.mov-instr-card__name {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.mov-instr-card__title {
  color: var(--mov-alt);
  font-size: 1rem;
  margin-top: -10px;
}

.mov-instr-card__bio {
  margin: 0 0 12px 0;
  color: var(--mov-black);
  opacity: 0.9;
  min-height: 1.2em; /* keep line for empty state */
}

/* Meta (city row and later email, etc.) */
.mov-instr-card__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 12px 0;
}
.mov-instr-card__city {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mov-black);
}
.mov-instr-card__city .fi {
  font-size: 16px;
  color: var(--mov-primary);
}

.mov-instr-card__email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mov-black);
}

.mov-instr-card__email .fi {
  font-size: 16px;
  color: var(--mov-primary);
}

/* Social links row */
.mov-instr-card__links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.mov-instr-card__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 0;
  color: var(--mov-bg);
  background-color: var(--mov-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}
.mov-instr-card__links a:hover {
  color: var(--mov-bg);
  background-color: var(--mov-black);
}
.mov-instr-card__links .fi {
  font-size: 18px;
  line-height: 1;
}

/* Responsive stacking on mobile/tablet */
@media (max-width: 960px) {
  .mov-instr-layout {
    flex-direction: column;
  }
  .mov-instr-layout__col--form,
  .mov-instr-layout__col--preview {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }
}

/* Repeater */
.mov-section-sep {
  height: 1px;
  background: var(--mov-alt);
  opacity: 0.5;
  margin: 18px 0;
}
/* Section field title/desc */
.mov-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

.mov-heading-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

.mov-heading-desc {
  display: block;
  margin-top: 6px;
  font-family: var(--mov-font-text);
  color: var(--mov-black);
  font-size: 0.9rem;
}

.mov-section-desc {
  color: var(--mov-alt);
  margin-bottom: 8px;
}
/* Phone composite layout: country code + local number */
.mov-phone {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
}
.mov-phone select,
.mov-phone .ts-wrapper {
  width: 100%;
}
.mov-phone .ts-wrapper .ts-control {
  min-height: 40px;
}
@media (max-width: 720px) {
  .mov-phone {
    grid-template-columns: 1fr;
  }
}
.mov-field--repeater .mov-field__label {
  font-weight: 700;
  margin-bottom: 10px;
}
.mov-repeater {
  display: block;
}
.mov-repeater__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mov-repeater__item {
  border: 1px solid var(--mov-alt);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}
.mov-repeater__grid {
  display: grid;
  grid-template-columns: 1fr 140px 40px;
  gap: 10px;
}
.mov-repeater__cell--actions {
  display: flex;
  align-items: center;
  justify-content: center;
}
button.mov-btn.mov-repeater__remove {
  background: #f2f2f2;
  color: #333;
  min-width: 40px;
  border: 0;
  border-color: none;
}
.mov-repeater__add {
  margin-top: 10px;
  background: var(--mov-primary);
  color: #fff;
}
@media (max-width: 720px) {
  .mov-repeater__grid {
    grid-template-columns: 1fr 120px 36px;
  }
}

.mov-input--select {
  border: 0;
}

/* .ts-wrapper.single .ts-control {
} */

.iti {
  position: relative;
  display: inline-block;
  width: 100%;
}

.iti__search-input {
  height: 36px;
}

button.iti__selected-country {
  z-index: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  background: none;
  border: 0;
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
}

/* Stepper (multi-step) */
.mov-field--stepper {
  margin-bottom: 16px;
}
/* Hide header stepper nav; per-section navs are rendered within sections */
.mov-field--stepper .mov-stepper__nav {
  display: none !important;
}

.mov-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 8px 0;
}

.mov-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-direction: column;
}

/* Connector between steps (flex item that fills space between circles) */
.mov-stepper__connector {
  align-self: center;
  flex: 1 1 auto;
  height: 2px;
  background: var(--mov-alt);
  margin: 0 10px; /* 10px gap from circles on each side */
  min-width: 20px; /* avoid collapsing too small */
}

.mov-step__circle {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--mov-alt);
  background: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.mov-step__number {
  font-weight: 700;
  color: var(--mov-black);
  font-size: 0.95rem;
  line-height: 1;
}

.mov-step__check {
  display: none;
  font-size: 18px;
  color: #fff;
}

.mov-step__excl {
  display: none;
  font-size: 18px;
  color: #fff;
}

.mov-step__labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  align-items: center;
}

/* Step label order and emphasis:
   - Title = "Lépés X" (smaller, gray)
   - Subtitle = section name (larger, prominent) */
.mov-step__title {
  font-weight: 600;
  color: var(--mov-alt);
  font-size: 0.85rem;
  line-height: 1.1;
}

.mov-step__subtitle {
  color: var(--mov-black);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
}

.mov-step__badge {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f4f4f4;
  color: var(--mov-black);
  border: 1px solid var(--mov-alt);
  white-space: nowrap;
}

/* Badge color states */
.mov-step__badge.is-done {
  background: var(--mov-primary);
  border-color: var(--mov-primary);
  color: #fff;
}
.mov-step__badge.is-progress {
  background: var(--mov-progress);
  border-color: var(--mov-progress);
  color: #fff;
}
.mov-step__badge.is-empty {
  background: #f4f4f4;
  border-color: var(--mov-alt);
  color: var(--mov-black);
}

/* State coloring for circles and connectors */
.mov-step--todo .mov-step__circle {
  border-color: var(--mov-alt);
  background: #fff;
}
.mov-step--active .mov-step__circle {
  border-color: var(--mov-progress);
  background: var(--mov-progress);
  box-shadow: 0 0 0 3px rgba(70, 65, 233, 0.12);
}
.mov-step--active .mov-step__number {
  display: none;
}
.mov-step--active .mov-step__excl {
  display: block;
}
.mov-step--done .mov-step__circle {
  border-color: var(--mov-primary);
  background: var(--mov-primary);
}
.mov-step--done .mov-step__number {
  display: none;
}
.mov-step--done .mov-step__check {
  display: block;
}

/* Connector progression (optional highlight for completed/current links) */
.mov-step--done + .mov-stepper__connector {
  background: var(--mov-primary);
}
.mov-step--active + .mov-stepper__connector {
  background: var(--mov-progress);
}

/* Nav buttons under stepper */
.mov-stepper__nav {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: space-between;
}
.mov-stepper__nav.is-first {
  justify-content: flex-end;
}
.mov-stepper__nav.is-last {
  justify-content: space-between;
}

/* Focused current step highlighting */
.mov-step--current .mov-step__circle {
  /* base: keep existing bg/border from state; add subtle emphasis */
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
.mov-step--active.mov-step--current .mov-step__circle {
  /* stronger blue glow for in-progress current step */
  box-shadow: 0 0 0 4px rgba(70, 65, 233, 0.12);
}
.mov-step--active.mov-step--current .mov-step__circle::after {
  content: "";
  position: absolute;
  inset: -10px; /* outer halo */
  border-radius: 50%;
  border: 2px solid rgba(70, 65, 233, 0.25);
  box-shadow: 0 0 0 6px rgba(70, 65, 233, 0.08);
}
.mov-step--done.mov-step--current .mov-step__circle {
  /* subtle emphasis for selected done step, keep check + red */
  box-shadow: 0 0 0 4px rgba(229, 20, 0, 0.1);
}

.mov-stepper__prev[hidden] {
  display: none !important;
}

.mov-stepper__next:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Group visibility (JS toggles display) */
[data-mov-step] {
  transition: opacity 0.15s ease;
}
/* [data-mov-step]:not(.is-active) {
  opacity: 0;
} */

/* Responsive tweaks */
@media (max-width: 720px) {
  .mov-step__connector {
    width: 28px;
  }
  .mov-step__circle {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
  .mov-step__title {
    font-size: 0.9rem;
  }
  .mov-step__subtitle {
    font-size: 0.75rem;
    text-align: center;
  }
}

/* Invalid state styling and UX improvements */
.mov-input.mov-input--invalid,
.mov-input--invalid {
  border-color: var(--mov-error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* Also highlight Tom Select control when the field in the same column is invalid */
.mov-form__col:has(.mov-input--invalid) .ts-wrapper .ts-control {
  border-color: var(--mov-error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

/* Ensure error list has consistent spacing */
.mov-field__errors {
  margin-top: 6px;
}

/* Disabled state for repeater buttons */
.mov-repeater__add:disabled,
.mov-repeater__remove:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.mov-btn.mov-repeater__add {
  background-color: var(--mov-black);
  color: var(--mov-bg);
  border: none !important;
  border-radius: 8px;
}

.has-items .ts-control > input {
  margin: 0 !important;
}

.mov-form__status.mov-form__status--success {
  padding: 20px;
  background-color: var(--mov-succ-color);
  color: white;
  text-transform: uppercase;
  font-family: var(--mov-font);
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}

.mov-form__status.mov-form__status--error {
  padding: 20px;
  background-color: var(--mov-error);
  color: white;
  text-transform: uppercase;
  font-family: var(--mov-font);
  margin-bottom: 20px;
  font-weight: 600;
  text-align: center;
}
