<script setup lang="ts">
// Simple label + slot wrapper used across the profile/security pages.
defineProps<{ label: string; hint?: string }>()
</script>

<template>
  <label class="field">
    <span class="label">{{ label }}</span>
    <slot />
    <span v-if="hint" class="hint">{{ hint }}</span>
  </label>
</template>

<style scoped>
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
}

.field :deep(input),
.field :deep(textarea),
.field :deep(select) {
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color 0.12s, background 0.12s;
}
.field :deep(textarea) {
  min-height: 110px;
  padding: 10px 12px;
  height: auto;
  resize: vertical;
  line-height: 1.55;
}
.field :deep(input:focus),
.field :deep(textarea:focus),
.field :deep(select:focus) {
  border-color: var(--text);
  background: var(--bg);
}
.field :deep(input:disabled) { background: var(--bg); color: var(--text-mute); cursor: not-allowed; }
</style>
