/**
 * Public company profile wizard — scoped styles.
 *
 * Everything lives under the `.iew` root so it never collides with the site's
 * Oxygen-built global styles. BEM with the `iew-` prefix.
 *
 * NOTE: the intl-tel-input flag sprites are vendored under
 * assets/images/vendor/intTelInput/. The vendored intlTelInput.css points its
 * --iti-path-flags-* vars at ../img/... (wrong for this layout), so we override
 * them here (scoped to .iew, which wins over the vendor :root rule).
 */

.iew {
  /* Design tokens */
  --iew-ink: #1c1c1c; /* header band, buttons, active stepper */
  --iew-paper: #ffffff;
  --iew-border: #e0e1e1; /* input borders, hairlines */
  --iew-muted: #8a8a8a; /* placeholders, hints, counters */
  --iew-stepper-inactive: #bcbcbc; /* inactive stepper badges, labels, connectors */
  --iew-error: #c4314b; /* asterisks, error text/borders */
  --iew-radius-card: 20px;
  --iew-radius-input: 24px; /* pill inputs & buttons */

  /* intl-tel-input flag sprites (override the vendor :root paths) */
  --iti-path-flags-1x: url(../images/vendor/intTelInput/flags.webp);
  --iti-path-flags-2x: url(../images/vendor/intTelInput/flags@2x.webp);
  --iti-path-globe-1x: url(../images/vendor/intTelInput/globe.webp);
  --iti-path-globe-2x: url(../images/vendor/intTelInput/globe@2x.webp);

  max-width: 1090px;
  width: 100%;
  margin: 0 auto;
  color: var(--iew-ink);
  font-family: inherit;
  box-sizing: border-box;
}

.iew *,
.iew *::before,
.iew *::after {
  box-sizing: border-box;
}

/* The [hidden] attribute must win over the display rules below (e.g. .iew-btn
   sets display:inline-flex, which would otherwise override hidden). */
.iew [hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- Stepper */

.iew-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  background: transparent;
  padding: 24px 0;
}

.iew-stepper__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 1 130px;
  text-align: center;
  cursor: default;
  position: relative;
}

.iew-stepper__divider {
  flex: 1 1 auto;
  max-width: 40px;
  align-self: flex-start;
  margin-top: 20px; /* 40px badge height / 2 → aligns line with the __num center */
  border-top: 1.5px solid var(--iew-stepper-inactive);
}

/* A divider is the next sibling of the step it follows; highlight it only when
   that preceding step is active or already visited. */
.iew-stepper__step.is-active + .iew-stepper__divider,
.iew-stepper__step.is-done + .iew-stepper__divider {
  border-top-color: #000;
}

.iew-stepper__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--iew-stepper-inactive);
  color: var(--iew-stepper-inactive);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.4;
  background: transparent;
  position: relative;
  z-index: 1;
}

.iew-stepper__label {
  color: var(--iew-stepper-inactive);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.5px;
  line-height: 1.4;
}

.iew-stepper__step.is-active .iew-stepper__num,
.iew-stepper__step.is-done .iew-stepper__num {
  background: #000;
  color: #fff;
  border-color: #000;
  font-weight: 700;
}

.iew-stepper__step.is-active .iew-stepper__label,
.iew-stepper__step.is-done .iew-stepper__label {
  color: #000;
  font-weight: 700;
}

.iew-stepper__step.is-done {
  cursor: pointer;
}

/* ------------------------------------------------------------------- Card */

.iew-card {
  background: var(--iew-paper);
  border-radius: var(--iew-radius-card);
  box-shadow:
    0 1px 3px 0 rgba(16, 24, 40, 0.1),
    0 1px 2px 0 rgba(16, 24, 40, 0.06);

  padding: 60px 44px;
}

.iew-card--notice {
  text-align: left;
}

.iew-card__head {
  border-bottom: 0.5px solid var(--iew-border);
  margin-bottom: 40px;
  padding-bottom: 16px;
}

.iew-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

/* --------------------------------------------------------------- Step panel */

.iew-step[hidden] {
  display: none;
}

/* ------------------------------------------------------------------- Grid */

.iew-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.iew-field--full {
  grid-column: 1 / -1;
}

/* ----------------------------------------------------------------- Fields */

.iew-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.iew-field__label {
  font-size: 16px;
  font-weight: 400;
}

.iew-field__req {
  color: var(--iew-error);
}

.iew-field__hint {
  font-size: 12px;
  color: var(--iew-muted);
}

.iew-field__error {
  font-size: 13px;
  color: var(--iew-error);
  margin: 2px 0 0;
}

.iew-field__error--notice {
  background: rgba(196, 49, 75, 0.08);
  border: 1px solid var(--iew-error);
  border-radius: 8px;
  padding: 8px 12px;
}

.iew-field__count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  color: var(--iew-muted);
}

.iew-input,
.iew-select,
.iew-textarea {
  width: 100%;
  border: 0.5px solid var(--iew-border);
  background: var(--iew-paper);
  color: var(--iew-ink);
  font: inherit;
  font-size: 14px;
  padding: 12px;
  border-radius: var(--iew-radius-input);
  outline: none;
  transition: border-color 0.15s ease;
}

.iew-textarea {
  border-radius: 12px;
  resize: vertical;
  min-height: 96px;
}

.iew-input::placeholder,
.iew-textarea::placeholder {
  color: var(--iew-muted);
}

.iew-input:focus,
.iew-select:focus,
.iew-textarea:focus {
  border-color: var(--iew-ink);
}

.iew-field.has-error .iew-input,
.iew-field.has-error .iew-select,
.iew-field.has-error .iew-textarea {
  border-color: var(--iew-error);
}

.iew-textarea-wrap {
  position: relative;
}

/* Native select chevron */
select.iew-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" fill="none"><path d="M1 1l5 5 5-5" stroke="%238a8a8a" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 40px;
}

/* --------------------------------------------------------------- Radios */

.iew-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-top: 4px;
}

.iew-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.iew-radio input[type="radio"] {
  accent-color: var(--iew-ink);
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------- File pill */

.iew-file {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--iew-border);
  border-radius: var(--iew-radius-input);
  padding: 6px 6px 6px 20px;
}

.iew-file__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.iew-file__name {
  flex: 1;
  color: var(--iew-muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------- Repeater */

.iew-repeater {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.iew-repeater__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.iew-repeater__row .iew-input {
  flex: 1;
}

.iew-repeater__remove {
  border: 1px solid var(--iew-border);
  background: var(--iew-paper);
  color: var(--iew-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  flex: 0 0 auto;
}

.iew-repeater__add {
  align-self: flex-start;
  border: none;
  background: none;
  color: var(--iew-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.iew-repeater__template {
  display: none;
}

/* --------------------------------------------------------------- Buttons */

.iew-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  padding: 8px 16px;
  border-radius: var(--iew-radius-input);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    opacity 0.15s ease,
    background 0.15s ease;
}

.iew-btn--solid {
  background: var(--iew-ink);
  color: var(--iew-paper);
  border-color: var(--iew-ink);
}

.iew-btn--solid:hover {
  opacity: 0.9;
}

.iew-btn--outline {
  background: var(--iew-paper);
  color: var(--iew-ink);
  border-color: var(--iew-ink);
}

.iew-btn--sm {
  padding: 8px 16px;
  font-size: 13px;
}

.iew-btn:disabled,
.iew-btn.is-loading {
  opacity: 0.6;
  cursor: default;
}

.iew-btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: iew-spin 0.7s linear infinite;
}

@keyframes iew-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.iew-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--iew-border);
  margin-top: 32px;
  padding-top: 24px;
}

.iew-back {
  color: var(--Black, #000);
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 700;
  line-height: 140%;
  letter-spacing: -0.00563rem;
  text-decoration: none;

  display: flex;
  padding: 6px 0;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.iew-back:hover {
  color: var(--iew-ink);
}

.iew-footer__actions {
  display: flex;
  gap: 12px;
}

/* --------------------------------------------------------------- Notices */

.iew-notice {
  background: rgba(196, 49, 75, 0.08);
  border: 1px solid var(--iew-error);
  color: var(--iew-error);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 24px;
  font-size: 14px;
}

.iew-notice--info {
  background: rgba(28, 28, 28, 0.05);
  border-color: var(--iew-border);
  color: var(--iew-ink);
}

.iew-notice__reload,
.iew-restore__discard {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.iew-restore {
  background: rgba(28, 28, 28, 0.04);
  border: 1px solid var(--iew-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--iew-muted);
}

/* --------------------------------------------------------------- Success */

.iew-success {
  background: var(--iew-paper);
  border-radius: var(--iew-radius-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 56px 48px;
  text-align: center;
}

.iew-success__icon {
  color: var(--iew-ink);
  margin-bottom: 8px;
}

.iew-success__title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 130%;
  margin: 0 0 16px;
}

.iew-success__intro {
  color: var(--iew-muted);
  margin: 0 auto 40px;
  max-width: 520px;
}

/* Mini-stepper (1—2—3) above the evaluation stages. Mirrors the top-band
   stepper's filled/outlined pattern; step 1 is the active/filled state. */
.iew-success__ministepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 0 auto 32px;
}

.iew-success__ministepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--iew-stepper-inactive);
  color: var(--iew-stepper-inactive);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.iew-success__ministepper-num.is-active {
  background: var(--iew-ink);
  border-color: var(--iew-ink);
  color: var(--iew-paper);
}

.iew-success__ministepper-line {
  width: 28px;
  height: 1px;
  background: var(--iew-stepper-inactive);
  flex: 0 0 auto;
}

.iew-success__ministepper-num.is-active + .iew-success__ministepper-line {
  background: var(--iew-ink);
}

.iew-success__steps {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  text-align: center;
  margin-bottom: 60px;
}

.iew-success__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  max-width: 258px;
}

.iew-success__step-icon {
  width: 40px;
  height: 40px;
  color: var(--iew-ink);
  margin-bottom: 6px;
}

.iew-success__step-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.iew-success__step-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.09px;
  margin: 0;
}

.iew-success__step-divider {
  width: 40px;
  height: 1px;
  background: var(--iew-border);
  margin: 12px auto;
}

.iew-success__step-text {
  font-size: 14px;
  line-height: 1.4;
  color: #5d5a54;
  margin: 0;
}

.iew-success__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* --------------------------------------------------------------- Honeypot */

.iew-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* ----------------------------------------------- Select2 skin (scoped) */

.iew .select2-container {
  width: 100% !important;
}

.iew .select2-container--default .select2-selection--single,
.iew .select2-container--default .select2-selection--multiple {
  min-height: 46px;
  border: 1px solid var(--iew-border);
  border-radius: var(--iew-radius-input);
  padding: 6px 12px;
  display: flex;
  align-items: center;
}

/* Multi-select can wrap onto several rows — top-align and grow. */
.iew .select2-container--default .select2-selection--multiple {
  align-items: flex-start;
  height: auto;
}

.iew
  .select2-container--default.select2-container--focus
  .select2-selection--single,
.iew
  .select2-container--default.select2-container--focus
  .select2-selection--multiple {
  border-color: var(--iew-ink);
}

.iew
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--iew-ink);
  line-height: normal;
  padding: 0 8px;
}

.iew
  .select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: var(--iew-muted);
}

.iew
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 44px;
  right: 12px;
}

.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}

/* Rebuild the chip as flex so the remove button sits cleanly to the left of
   the label instead of absolutely overlapping it (Select2's default puts
   __remove at position:absolute;left:0 and reserves space via padding-left,
   which our custom padding/radius broke). */
.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--iew-ink);
  color: var(--iew-paper);
  border: none;
  border-radius: 14px;
  padding: 3px 12px;
  margin: 0;
  max-width: 100%;
}

.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__display {
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  order: 2;
}

.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove {
  position: static;
  order: 1;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1;
  border-radius: 0;
  flex: 0 0 auto;
}

.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove:hover,
.iew
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove:focus {
  background: transparent;
  color: var(--iew-paper);
  outline: none;
}

/* Inline search field: align with the flex chips and use the wizard font. */
.iew
  .select2-container--default
  .select2-search--inline
  .select2-search__field {
  margin: 0;
  height: 30px;
  font: inherit;
  color: var(--iew-ink);
}

/* Single-select selected text baseline fix inside the flex container. */
.iew
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  display: flex;
  align-items: center;
}

/* Dropdown panel. Select2 renders it as a body-level (or dropdownParent)
   sibling with global classes, so these rules are unscoped by necessity — the
   .select2-* names are Select2-specific and collision-safe. Colours are
   hard-coded to the design tokens because the panel may escape the .iew var
   scope depending on dropdownParent. */
.select2-dropdown {
  border: 1px solid #e0e1e1;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: #ffffff;
}

/* When Select2 opens the panel above the control (not enough room below), the
   touching edges must be square so the panel joins the control cleanly instead
   of a rounded corner overlapping the field/label above it (the report). */
.select2-container--open .select2-dropdown--above {
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.select2-container--open .select2-dropdown--below {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* Search box at the top of a searchable dropdown — match the pill inputs and
   drop the browser's heavy blue focus ring (the default state in the report). */
.select2-container--default .select2-search--dropdown {
  padding: 10px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #e0e1e1;
  border-radius: 20px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  color: #1c1c1c;
  outline: none;
  box-shadow: none;
}

.select2-container--default
  .select2-search--dropdown
  .select2-search__field:focus {
  border-color: #1c1c1c;
}

/* Results list + option rows. */
.select2-container--default .select2-results > .select2-results__options {
  max-height: 260px;
  padding: 6px;
}

.select2-container--default .select2-results__option {
  padding: 9px 12px;
  border-radius: 12px;
  color: #1c1c1c;
  font-size: 14px;
  line-height: 1.3;
}

/* Keyboard/hover highlight. This is Select2 4.1's two-class selector — it must
   match the vendor's specificity (0-3-0) to override its bright-blue default
   (.select2-results__option--highlighted.select2-results__option--selectable
   { background:#5897fb; color:#fff }), the blue seen in the report. */
.select2-container--default
  .select2-results__option--highlighted.select2-results__option--selectable {
  background: #f2f3f3;
  color: #1c1c1c;
}

/* Already-selected row — the vendor paints it #ddd (the grey bar under the
   placeholder in the report). */
.select2-container--default .select2-results__option--selected {
  background: #f2f3f3;
  color: #1c1c1c;
  font-weight: 600;
}

/* Highlighted AND selected at once (both classes present) stays in the
   neutral wash rather than reverting to blue. */
.select2-container--default
  .select2-results__option--selected.select2-results__option--highlighted {
  background: #ebecec;
  color: #1c1c1c;
}

/* Non-selectable rows — the "Selectați…" placeholder option and the
   "No results found" message both carry --disabled in 4.1. Render muted, never
   the selected wash. */
.select2-container--default .select2-results__option--disabled {
  color: #8a8a8a;
  background: transparent;
  font-weight: 400;
  cursor: default;
}

/* ------------------------------------------------- intl-tel-input (scoped) */

.iew .iti {
  width: 100%;
}

.iew .iti input.iew-phone,
.iew .iti input[type="tel"] {
  width: 100%;
}

.iti__country.iti__country {
  display: flex;
}

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

@media (max-width: 782px) {
  .iew-card,
  .iew-success {
    padding: 24px 20px;
  }

  .iew-grid {
    grid-template-columns: 1fr;
  }

  .iew-stepper {
    padding: 18px 0;
    gap: 8px;
  }

  .iew-stepper__label {
    display: none;
  }

  .iew-stepper__step.is-active .iew-stepper__label {
    display: block;
    position: absolute;
    top: 48px;
    white-space: nowrap;
  }

  .iew-stepper__step:not(:last-child)::after {
    left: calc(50% + 24px);
    right: calc(-50% + 24px);
  }

  .iew-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .iew-footer__actions {
    flex-direction: column;
  }

  .iew-footer__actions .iew-btn {
    width: 100%;
  }

  .iew-success__steps {
    flex-direction: column;
    align-items: center;
  }

  .iew-success__actions {
    flex-direction: column;
  }

  .iew-success__title {
    font-size: 26px;
  }
}
