/* profile.css — edit-mode + action-button visibility for profile.html */

#profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

#profile-actions [data-mode] {
  display: none;
  text-align: center;
}

#profile-actions[data-state="other"] [data-mode="other"] { display: inline-block; }
#profile-actions[data-state="self"]    [data-mode="self"]    { display: inline-block; }
#profile-actions[data-state="editing"] [data-mode="editing"] { display: inline-block; }

.profile-name {
  white-space: pre-line;
}

.profile-edit-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

.profile-edit-input:focus {
  outline: none;
  border-color: var(--gold-dim);
}

.profile-edit-input-sm {
  font-size: 13px;
  padding: 8px 10px;
}

textarea.profile-edit-input {
  min-height: 64px;
}

.profile-edit-row {
  margin-top: 16px;
}

.profile-edit-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

/* ── Secondary-pillar chip selector (edit mode) ───────────── */
.profile-pillar-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-pillar-chip {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.profile-pillar-chip:hover { color: var(--white); border-color: var(--border); }

.profile-pillar-chip.selected {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: rgba(180, 142, 71, 0.06);
}

/* ── Achievements editor ──────────────────────────────────── */
.profile-ach-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-ach-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 28px;
  gap: 8px;
  align-items: center;
}

.profile-ach-year { padding: 8px 10px; font-size: 12px; }
.profile-ach-title,
.profile-ach-details { padding: 8px 10px; font-size: 13px; }

.profile-ach-remove {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.profile-ach-remove:hover { color: #d97a7a; border-color: #d97a7a; }

.profile-ach-add {
  margin-top: 8px;
  width: auto;
}

@media (max-width: 600px) {
  .profile-ach-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "year remove"
      "title title"
      "details details";
    gap: 6px;
  }
  .profile-ach-year    { grid-area: year; }
  .profile-ach-remove  { grid-area: remove; justify-self: end; }
  .profile-ach-title   { grid-area: title; }
  .profile-ach-details { grid-area: details; }
}

/* ── Photo upload (edit mode) ──────────────────── */
.profile-photo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.profile-photo-status {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0;
  min-height: 14px;
}

/* ── Tags (read-only display + edit chips) ───────── */
.profile-tags-section {
  margin-top: 24px;
}
.profile-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.profile-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 4px 10px;
}
.profile-tag-chip.is-readonly { cursor: default; }
.profile-tag-x {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.profile-tag-x:hover { color: var(--gold); }

.profile-tag-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profile-tag-input {
  font-size: 13px;
}
.profile-tag-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
