/**
 * Form Elements
 * Modern form styling with glassmorphism
 */

/* ============================================
   INPUT BASE
   ============================================ */
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

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

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226, 1, 205, 0.1);
  background: rgba(226, 1, 205, 0.05);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   TEXTAREA
   ============================================ */
.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ============================================
   SELECT
   ============================================ */
.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23888' d='M4.427 6.427a.6.6 0 01.848 0L8 9.152l2.725-2.725a.6.6 0 11.848.848l-3.15 3.15a.6.6 0 01-.848 0l-3.15-3.15a.6.6 0 010-.848z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ============================================
   CHECKBOX & RADIO
   ============================================ */
.form-checkbox,
.form-radio {
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-checkbox {
  border-radius: 4px;
  appearance: none;
  position: relative;
}

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

.form-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-radio {
  border-radius: 50%;
  appearance: none;
  position: relative;
}

.form-radio:checked {
  border-color: var(--primary);
}

.form-radio:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}

/* ============================================
   FORM GROUP
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--foreground);
}

.form-label-required::after {
  content: '*';
  color: var(--destructive);
  margin-left: 0.25rem;
}

.form-hint {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.form-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--destructive);
}

/* ============================================
   INPUT WITH ICON
   ============================================ */
.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.input-wrapper .form-input {
  padding-left: 2.75rem;
}

.input-icon-right {
  left: auto;
  right: 1rem;
}
