/* ============================================================
   FORMS — light theme, red focus ring
   ============================================================ */

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

.form-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-black);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.form-label__optional {
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  text-transform: none;
  letter-spacing: 0;
}

.form-input,
.form-textarea {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  background: #ffffff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow   var(--dur-fast) var(--ease-out);
  -webkit-appearance: none;
  appearance: none;
}

.form-textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  min-height: 96px;
  line-height: var(--leading-relaxed);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
  font-weight: var(--weight-regular);
}

/* Red focus — SM style */
.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: rgba(220, 38, 38, 0.50);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.form-input.is-error,
.form-textarea.is-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-error);
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity   var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.form-error.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.form-error svg {
  width: 14px;
  height: 14px;
  stroke: var(--color-error);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}

/* File upload drop zone */
.form-dropzone {
  border: 1.5px dashed rgba(0, 0, 0, 0.16);
  border-radius: var(--radius-md);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background   var(--dur-fast) var(--ease-out);
  position: relative;
}

.form-dropzone:hover,
.form-dropzone.is-dragover {
  border-color: var(--color-accent);
  background: #fef2f2;
}

.form-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.form-dropzone__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto var(--space-3);
}

.form-dropzone__icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--color-text-muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.form-dropzone__text {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.form-dropzone__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--weight-regular);
}

/* File selected state */
.form-file-selected {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: #ffffff;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
}

.form-file-selected.is-visible { display: flex; }

.form-file-selected__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
}

.form-file-selected__name {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}

.form-file-selected__size {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: 0;
}

.form-file-selected__remove {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition:
    background var(--dur-fast) var(--ease-out),
    color      var(--dur-fast) var(--ease-out);
}

.form-file-selected__remove:hover {
  background: #fee2e2;
  color: var(--color-error);
}

.form-file-selected__remove svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
