/* =========================================================
   Components - Form Sistemi
========================================================= */

.ozd-form-control,
.ozd-form__input,
.ozd-form__select,
.ozd-form__textarea,
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--ozd-border);
  border-radius: var(--ozd-radius-md);
  background: #ffffff;
  color: var(--ozd-text);
  font-family: var(--ozd-font-main);
  line-height: 1.35;
  transition: border-color var(--ozd-transition), box-shadow var(--ozd-transition), background var(--ozd-transition);
}

textarea,
textarea.ozd-form-control,
.ozd-form__textarea {
  min-height: 124px;
  resize: vertical;
}

.ozd-form-control:focus,
.ozd-form__input:focus,
.ozd-form__select:focus,
.ozd-form__textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--ozd-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
  outline: 0;
}

input::placeholder,
textarea::placeholder { color: #94a3b8; }

input[disabled],
textarea[disabled],
select[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
}

.ozd-form {
  display: grid;
  gap: 14px;
}

.ozd-form__row,
.ozd-form-group {
  min-width: 0;
  margin: 0;
}

.ozd-form__label,
.ozd-form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--ozd-primary);
  font-weight: 750;
}

.ozd-form__help,
.ozd-form-help {
  display: block;
  margin-top: 6px;
  color: var(--ozd-muted);
  font-size: 0.9rem;
}

.ozd-form__grid,
.ozd-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ozd-form__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.ozd-form__status {
  min-height: 24px;
  margin-top: 4px;
  font-weight: 750;
}

.ozd-form__status.is-error { color: var(--ozd-danger); }
.ozd-form__status.is-ok { color: var(--ozd-success); }

.ozd-check,
.ozd-radio {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ozd-text-soft);
  font-weight: 650;
}

.ozd-check input,
.ozd-radio input,
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: 0;
  margin-top: 0.28em;
  padding: 0;
  accent-color: var(--ozd-accent);
}

.ozd-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .ozd-form__grid,
  .ozd-form-grid { grid-template-columns: 1fr; }

  .ozd-form__actions { align-items: stretch; }

  .ozd-form__actions .ozd-btn { width: 100%; }
}
