/* ==========================================================================
   Proje: HIZIRBEY Portal
   Paket: HIZIRBEY Design System
   Bileşen: Form Builder
   Dosya: themes/default/assets/css/hds/components/form/controls.css
   Açıklama: Input, Select, Textarea, Checkbox ve Radio kontrolleri.
   Mimari: Form Builder control katmanı.
   Yazar: Mehmet Kalli
   Oluşturuldu: 03.08.2026 01:15
   Ownership: Public FormControl presentation
   Contract: .hds-input, .hds-select, .hds-textarea, .hds-checkbox, .hds-radio
   Güncellendi: 12.08.2026
   Sürüm: 1.0.0
========================================================================== */

/* =========================================================================
 * >>> Switch
 * -------------------------------------------------------------------------
 * Checkbox semantiğini koruyan genel HDS switch sunumu.
 * Modül özelindeki renk, ölçü ve yerleşim burada tanımlanmaz.
 * ========================================================================= */

/* Anahtar solda; etiket yanında, yardım metni (varsa) etiketin altında. */
.hds-field--switch {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.15rem;
}

.hds-field--switch > .hds-field__control {
  grid-row: span 2;
  display: flex;
  align-items: center;
}

.hds-field--switch > .hds-field__label,
.hds-field--switch > .hds-field__help {
  grid-column: 2;
}

.hds-field--switch .hds-checkbox {
  position: relative;
  appearance: none;
  -webkit-appearance: none;

  box-sizing: border-box;
  width: 2.25rem;
  height: 1.25rem;
  margin: 0;

  border: 1px solid currentColor;
  border-radius: 999px;

  background: transparent;
  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.hds-field--switch .hds-checkbox::before {
  content: "";

  position: absolute;
  top: 50%;
  left: 0.15rem;

  width: 0.8rem;
  height: 0.8rem;

  border-radius: 50%;
  background: currentColor;

  transform: translateY(-50%);
  transition: transform 0.15s ease;
}

.hds-field--switch .hds-checkbox:checked {
  border-color: var(--hds-switch-on, #1677ff);
  background: var(--hds-switch-on, #1677ff);
  color: var(--hds-switch-on, #1677ff);
}

.hds-field--switch .hds-checkbox:checked::before {
  background: #fff;
  transform: translate(0.95rem, -50%);
}

.hds-field--switch .hds-checkbox:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.hds-field--switch .hds-checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* <<< Switch */

/* =========================================================================
 * >>> Form Controls
 * ========================================================================= */
.hds-input,
.hds-select,
.hds-textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #bfcbd2;
  border-radius: 4px;
  background: #fff;
  color: #263b4a;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}
.hds-textarea {
  /* Blok: satır içi tabanı altında yazı satırı boşluğu bırakmaz (DOCTYPE, 20.10.2026). */
  display: block;
  min-height: 90px;
  resize: vertical;
}
.hds-input:focus,
.hds-select:focus,
.hds-textarea:focus {
  border-color: #83b8c7;
  outline: 0;
  box-shadow: 0 0 0 3px rgb(131 184 199 / 18%);
}
.hds-input::placeholder,
.hds-textarea::placeholder {
  color: #87949d;
}
.hds-checkbox,
.hds-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2f80ed;
}
/* <<< Form Controls */
