/**
 * ==================================================
 * FORM
 * ==================================================
*/

.ik-form {
  display: flex;
  flex-direction: column;
  gap: var(--ik-space-lg);
}

.ik-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--ik-space-sm);
}

.ik-form__actions {
  margin-top: var(--ik-space-sm);
}

/**
 * ==================================================
 * LABEL
 * ==================================================
*/

.ik-label {
  color: var(--ik-color-heading);

  font-size: var(--ik-font-size-md);
  font-weight: var(--ik-font-weight-extra-bold);

  line-height: var(--ik-line-height-normal);
}

/**
 * ==================================================
 * INPUT & SELECT
 * ==================================================
*/

.ik-input,
.ik-select {
  width: 100%;
  min-height: 48px;

  padding: 0 var(--ik-space-md);

  background: var(--ik-color-card);

  border: 1px solid var(--ik-color-border);
  border-radius: var(--ik-radius-sm);

  color: var(--ik-color-text);

  font-size: var(--ik-font-size-sm);

  transition: var(--ik-transition);
}

.ik-input:focus,
.ik-select:focus {
  outline: none;

  border-color: var(--ik-color-primary);

  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.ik-search-form--full .ik-input::placeholder {
  color: var(--ik-color-muted);
}

.ik-search-form--full .ik-select {
  cursor: pointer;
}

/**
 * ==================================================
 * SEARCH FORM
 * BASE
 * ==================================================
*/

.ik-search-form {
  display: flex;
  flex-direction: column;

  width: 100%;
}

/**
 * ==================================================
 * SEARCH FORM
 * COMPONENTS
 * ==================================================
*/

.ik-search-form__heading {
  display: flex;
  align-items: center;

  gap: var(--ik-space-sm);
}

.ik-search-form__field {
  position: relative;

  display: flex;
  align-items: center;

  width: 100%;
  min-height: 60px;

  padding: 0 1px;
  gap: var(--ik-space-sm);

  background: var(--ik-color-white);

  border: 1px solid var(--ik-color-border);

  border-radius: var(--ik-radius-sm);

  /* Smooth focus / hover animation */
  transition:
    border-color var(--ik-transition),
    box-shadow var(--ik-transition),
    color var(--ik-transition),
    background-color var(--ik-transition);
}

.ik-search-form__field input,
.ik-search-form__field select {
  flex: 1;
  padding-left: 40px;
  width: 100%;
  height: 100%;

  border: none;
  outline: none;
  box-shadow: none;

  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.ik-search-form__field select {
  flex: 1;

  width: 100%;
  height: 100%;

  padding: 0 44px 0 44px;

  border: none;
  outline: none;

  background: transparent;

  font-size: var(--ik-font-size-md);
  color: var(--ik-color-heading);

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  cursor: pointer;
}

.ik-search-form__field:focus-within {
  border-color: var(--ik-color-primary);

  color: var(--ik-color-primary);

  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

/* Keep the homepage hero (full) focus animation explicit. */
.ik-search-form--full .ik-search-form__field {
  transition:
    border-color var(--ik-transition),
    box-shadow var(--ik-transition),
    color var(--ik-transition);
}

.ik-search-form--full .ik-search-form__field:focus-within {
  border-color: var(--ik-color-primary);
  color: var(--ik-color-primary);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12);
}

.ik-search-form__field input {
  flex: 1;

  width: 100%;
  height: 100%;

  padding: 0 /* top    */ 16px /* right  */ 0 /* bottom */ 42px; /* left   */

  border: none;
  outline: none;

  background: transparent;

  font-size: var(--ik-font-size-sm);
  color: var(--ik-color-transparent);

  box-shadow: none;
}

.ik-search-form__field input::placeholder {
  color: var(--ik-color-transparent);
}

.ik-search-form__icon {
  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.ik-search-form__field .ik-search-form__icon {
  position: absolute;

  left: 14px;

  top: 50%;

  transform: translateY(-50%);

  pointer-events: none;
}

.ik-search-form__field:hover {
  color: var(--ik-color-primary);
}

.ik-search-form__icon svg {
  width: 30px;
  height: 30px;

  display: block;

  stroke: currentColor;
}

.ik-search-form__field .ik-search-form__icon svg {
  width: 22px;
  height: 22px;
}

.ik-search-form__chevron {
  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  color: var(--ik-color-text);
}

.ik-search-form__field .ik-search-form__chevron {
  position: absolute;

  right: 16px;

  top: 50%;

  transform: translateY(-50%);

  pointer-events: none;
}

.ik-search-form__chevron svg {
  width: 18px;
  height: 18px;
}

/**
 * ==================================================
 * FULL
 * ==================================================
*/

.ik-search-form--full {
  gap: var(--ik-space-md);
}

.ik-search-form--full .ik-search-form__grid {
  display: grid;

  grid-template-columns:
    2fr
    1.5fr
    1fr
    1fr
    auto;

  gap: var(--ik-space-md);

  padding: var(--ik-space-md);

  background: var(--ik-color-white);

  border: 1px solid var(--ik-color-border);

  border-radius: var(--ik-radius-lg);

  box-shadow: var(--ik-shadow-md);
}

.ik-search-form--full .ik-search-form__top {
  display: flex;
  align-items: stretch;

  gap: var(--ik-space-md);
}

.ik-search-form--full .ik-search-form__bottom {
  display: grid;
  /* minmax(0, 1fr) — not bare 1fr — so each column's automatic minimum
     size ignores its content and the three fields always stay locked to
     an equal third of the row. A bare 1fr still lets a track grow past
     its share to fit a child's intrinsic content width (this is what let
     Select2's rendered "Lokasi" text push the column wider than
     Pendidikan/Pengalaman on desktop). */
  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: var(--ik-space-md);
}

.ik-search-form--full .ik-search-form__field {
  flex: 1;
}

/**
 * ==================================================
 * COMPACT
 * ==================================================
*/

.ik-search-form--compact {
  gap: var(--ik-space-lg);
}

.ik-search-form--compact .ik-search-form__field {
  padding: 0;
  height: 52px;

  border-radius: var(--ik-radius-sm);
  display: flex;
  align-items: center;

  transition:
    border-color var(--ik-transition),
    box-shadow var(--ik-transition),
    background-color var(--ik-transition);
}

.ik-search-form select:has(option:checked[value=""]) {
  color: var(--ik-color-muted);
  font-size: var(--ik-font-size-sm);
}

.ik-search-form--compact .ik-search-form__field input:focus,
.ik-search-form--compact .ik-search-form__field select:focus {
  outline: none;
  box-shadow: none;
}

.ik-search-form--compact .ik-search-form__field:hover {
  border-color: var(--ik-color-primary);
}

.ik-search-form--compact .ik-search-form__field:focus-within {
  border-color: var(--ik-color-primary);

  box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.08);
}

/* Sisakan ruang di kiri untuk icon (posisinya absolute, lihat
   .ik-search-form__field .ik-search-form__icon di atas), sama seperti
   field di homepage (--full). Select tidak perlu diatur di sini karena
   sudah mewarisi padding 0 44px 0 44px dari .ik-search-form__field select
   di atas — itu juga menyisakan ruang untuk chevron di kanan. */
.ik-search-form--compact .ik-search-form__field input {
  width: 100%;
  height: 100%;

  padding: 0 var(--ik-space-md) 0 42px;

  border: none;
  background: transparent;
  outline: none;
  box-shadow: none;

  font-size: var(--ik-font-size-sm);
  color: var(--ik-color-heading);
}

.ik-search-form input::placeholder {
  color: var(--ik-color-muted);
  opacity: 1;
}

.ik-search-form--compact .ik-search-form__actions {
  margin-top: var(--ik-space-sm);
}

/**
 * ==================================================
 * SEARCHABLE LOCATION (SELECT2)
 * ==================================================
*/

.ik-search-form .select2-container {
  flex: 1;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Select2 wraps the visible selection box in an inner `.selection` span
   (between `.select2-container` and `.select2-selection--single`) that
   the rules above never touched. Left unbounded, it can size itself to
   the currently selected option's text instead of inheriting the fixed
   width above — this is what let a long selected city name (e.g.
   "Kabupaten Pesisir Selatan - Sumatera Barat") force the Lokasi field
   wider than Pendidikan/Pengalaman on desktop. Lock every layer in the
   chain to the container's own width. */
.ik-search-form .select2-container .selection,
.ik-search-form .select2-container--default .select2-selection--single {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* The field itself is a grid/flex item (in .ik-search-form__bottom's 3-column
   grid, and in .ik-search-form__field's own flex row). Grid/flex items default
   to min-width: auto, which lets a long Select2 label force this column wider
   than its 1fr share — pushing the other two fields to overlap/truncate.
   min-width: 0 lets it shrink to the column's actual size so the label
   ellipsizes instead. */
.ik-search-form__field {
  min-width: 0;
}

.ik-search-form .select2-container--default .select2-selection--single {
  height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ik-search-form--compact .select2-container--default .select2-selection--single {
  height: 50px;
}

.ik-search-form .select2-container--default .select2-selection--single .select2-selection__rendered {
  height: 100%;
  padding: 0 44px 0 44px !important;
  display: flex;
  align-items: center;
  color: var(--ik-color-heading);
  font-size: var(--ik-font-size-sm);
  line-height: 1.4;

  /* Select2's own stylesheet sets white-space: nowrap here, which lets a
     long option label (e.g. "Kabupaten Semarang - Jawa Tengah") force this
     box wider than its grid column. Truncate instead of growing. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Belt-and-suspenders: Select2's own stylesheet applies padding/margin to
   these inner nodes. Zero them out explicitly so the ONLY left offset the
   text can ever have is the padding set on .select2-selection__rendered
   above — the same value used for the plain <select> fields (Pendidikan /
   Pengalaman). Without this, a stale/cached copy of Select2's CSS loading
   after ours can silently reintroduce its default 8px/20px padding and
   shift "Semua Lokasi" out of line with the other placeholders. */
.ik-search-form .select2-container--default .select2-selection--single .select2-selection__rendered,
.ik-search-form .select2-container--default .select2-selection--single .select2-selection__placeholder,
.ik-search-form .select2-container--default .select2-selection--single .select2-selection__clear {
  margin: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ik-search-form .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.ik-search-form .select2-container--default.select2-container--focus .select2-selection--single,
.ik-search-form .select2-container--default.select2-container--open .select2-selection--single {
  border: 0;
}

.ik-search-form .select2-dropdown {
  border-color: var(--ik-color-border);
  border-radius: var(--ik-radius-sm);
  overflow: hidden;
  box-shadow: var(--ik-shadow-md);
}

.ik-search-form .select2-search--dropdown .select2-search__field {
  border: 1px solid var(--ik-color-border);
  border-radius: var(--ik-radius-sm);
  min-height: 40px;
}

.ik-search-form .select2-results__option {
  padding: 10px 14px;
}

.ik-search-form .select2-results__option--highlighted[aria-selected] {
  background: var(--ik-color-primary);
}
