/* ═══════════════════════════════════════════════
   Ákotí Inputs & Form Fields — Pure CSS

   <div class="akoti-field">
     <label class="akoti-label">Email</label>
     <input type="email" class="akoti-input" placeholder="you@example.com">
     <span class="akoti-field-hint">We'll never share your email.</span>
   </div>

   Textarea:    <textarea class="akoti-input akoti-textarea"></textarea>
   Validation:  .akoti-input.error, .akoti-input.success
   Sizes:       .sm, .lg
   With icon:   wrap in .akoti-input-icon
   ═══════════════════════════════════════════════ */

/* ── Field wrapper ─────────────────────────────────── */

.akoti-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: 'Outfit', system-ui, sans-serif;
}

.akoti-label {
  font-size: 12px;
  font-weight: 600;
  color: #1e1e24;
  letter-spacing: 0.2px;
}

.akoti-label .required {
  color: #c62828;
  margin-left: 2px;
}

/* ── Input ─────────────────────────────────────────── */

.akoti-input {
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(26, 47, 94, 0.15);
  border-radius: 12px 4px 12px 4px;
  background: white;
  color: #1e1e24;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  width: 100%;
}

.akoti-input::placeholder { color: #b0b0b8; }

.akoti-input:hover {
  border-color: rgba(26,47,94,0.25);
}

.akoti-input:focus {
  border-color: #1a2f5e;
  border-radius: 4px 12px 4px 12px;
  box-shadow: 0 0 0 3px rgba(26,47,94,0.08), inset 0 1px 3px rgba(0,0,0,0.04);
}

/* ── Textarea ──────────────────────────────────────── */

.akoti-textarea {
  height: auto;
  min-height: 100px;
  padding: 10px 14px;
  resize: vertical;
  line-height: 1.5;
}

/* ── Sizes ─────────────────────────────────────────── */

.akoti-input.sm { height: 32px; font-size: 12px; padding: 0 10px; border-radius: 8px 3px 8px 3px; }
.akoti-input.sm:focus { border-radius: 3px 8px 3px 8px; }

.akoti-input.lg { height: 48px; font-size: 16px; padding: 0 18px; border-radius: 16px 6px 16px 6px; }
.akoti-input.lg:focus { border-radius: 6px 16px 6px 16px; }

/* ── Validation states ─────────────────────────────── */

.akoti-input.error {
  border-color: #c62828;
  box-shadow: inset 0 1px 3px rgba(198,40,40,0.08);
}
.akoti-input.error:focus {
  box-shadow: 0 0 0 3px rgba(198,40,40,0.08);
  border-color: #c62828;
}

.akoti-input.success {
  border-color: #2e7d32;
  box-shadow: inset 0 1px 3px rgba(46,125,50,0.08);
}
.akoti-input.success:focus {
  box-shadow: 0 0 0 3px rgba(46,125,50,0.08);
  border-color: #2e7d32;
}

/* ── Hints & Errors ────────────────────────────────── */

.akoti-field-hint {
  font-size: 11px;
  color: #8a8a96;
}

.akoti-field-error {
  font-size: 11px;
  color: #c62828;
  font-weight: 500;
}

/* ── Input with icon ───────────────────────────────── */

.akoti-input-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.akoti-input-icon .akoti-input { padding-left: 38px; }

.akoti-input-icon .aki {
  position: absolute;
  left: 12px;
  color: #8a8a96;
  pointer-events: none;
  z-index: 1;
}

.akoti-input-icon .akoti-input:focus ~ .aki,
.akoti-input-icon .akoti-input:focus + .aki {
  color: #1a2f5e;
}

/* ── Disabled ──────────────────────────────────────── */

.akoti-input:disabled {
  background: #f0f2f5;
  color: #8a8a96;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ── Select native ─────────────────────────────────── */

select.akoti-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235f6368'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* ── Dark mode ─────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .akoti-label { color: #e0e0e4; }
  :root:not([data-theme="light"]) .akoti-input {
    background: #2a2a32;
    color: #e0e0e4;
    border-color: rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
  }
  :root:not([data-theme="light"]) .akoti-input::placeholder { color: #5a5a66; }
  :root:not([data-theme="light"]) .akoti-input:hover { border-color: rgba(255,255,255,0.2); }
  :root:not([data-theme="light"]) .akoti-input:focus { border-color: #a8c8e8; box-shadow: 0 0 0 3px rgba(168,200,232,0.15); }
  :root:not([data-theme="light"]) .akoti-input:disabled { background: #1e1e24; }
  :root:not([data-theme="light"]) .akoti-field-hint { color: #6a6a76; }
}
