/* ==========================================================================
   MasalSaatim - Forms CSS
   ========================================================================== */

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label span.optional {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.15);
}

textarea.form-control {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Validations elements */
.form-group.has-error .form-control {
  border-color: var(--color-danger);
}

.form-group.has-error .form-control:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
}

.form-error-msg {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-danger);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Checkboxes and radio buttons custom layout */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-check-input {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-top: 2px;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Select element chevron styles */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 40px;
}
