/* A character page: header, equipment and recipe item lists, talents, and professions. */

.back-button { font-size: 17px; margin: 0 0 14px; }
.detail-card { overflow: hidden; }
.detail-message { padding: 30px var(--gutter); color: #a2b0b9; font-size: 18px; margin: 0; }

.character-header { display: flex; align-items: center; gap: 20px; padding: 26px var(--gutter) 18px; flex-wrap: wrap; }
.character-avatar { width: 84px; height: 84px; border-radius: 50%; border: 1px solid #8c744d; object-fit: cover; background: var(--raised); flex: 0 0 84px; }
.character-title { flex: 1; min-width: 220px; }
.character-title h2 { font: 600 30px/1.2 var(--font-display); color: #f2efe4; margin-bottom: 6px; }
.character-title p { color: #a9b5be; font-size: 18px; margin: 0; }
.character-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
.character-facts dt { color: var(--gold-label); font-size: 13px; font-weight: 700; letter-spacing: .14em; }
.character-facts dd { white-space: nowrap; margin: 4px 0 0; color: #f0ebe0; font: 600 22px var(--font-serif); }

.detail-section { padding: 24px var(--gutter); border-bottom: 1px solid var(--divider); }
.detail-empty { color: var(--text-faint); font-size: 16px; margin: 0; }

/* Item rows: equipment and recipes. Hover, focus, or tap shows the tooltip. */
.equipment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.item-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); column-gap: 18px; }
.equipment-item { display: flex; align-items: center; gap: 11px; padding: 5px 8px; border-radius: 4px; cursor: help; }
.equipment-item:hover, .equipment-item:focus-visible { background: var(--raised); }
.item-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 4px; border: 1px solid #5d6b75; background: #0f1a26; }
.item-text { display: grid; gap: 1px; min-width: 0; }
.item-name { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-text small { color: var(--text-faint); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Item quality colors for names (and tooltips) and icon borders. */
.quality-poor { color: #9d9d9d; } .quality-border-poor { border-color: #9d9d9d; }
.quality-common { color: #f2f2f2; } .quality-border-common { border-color: #8a8f94; }
.quality-uncommon { color: var(--game-green); } .quality-border-uncommon { border-color: #2fae3b; }
.quality-rare { color: #3d9bff; } .quality-border-rare { border-color: #2f7dd0; }
.quality-epic { color: #c27bff; } .quality-border-epic { border-color: #a335ee; }
.quality-legendary { color: #ff9b33; } .quality-border-legendary { border-color: #ff8000; }

/* Talents: one column per tree, each talent with its icon, rank, and description. */
.spec-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.spec-button { background: #1a2a39; border: 1px solid #344552; border-radius: 4px; color: #9eacb6; font-size: 16px; font-weight: 700; padding: 7px 14px; }
.spec-button small { font-weight: 400; }
.spec-button:hover { color: #fff; }
.spec-button.selected { color: var(--gold-selected); border-color: var(--gold-underline); }
.talent-trees { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.talent-tree { background: #1a2a39; border: 1px solid #344552; border-radius: 4px; padding: 12px 13px; }
.talent-tree.unspent { opacity: .65; }
.talent-tree-heading { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.talent-tree-heading strong { color: #eadbbd; font-size: 17px; }
.talent-tree-heading span { color: var(--gold); font: 600 21px var(--font-serif); }
.talent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.talent { display: flex; gap: 10px; align-items: flex-start; }
.talent-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 4px; border: 1px solid #6d7a84; background: #0f1a26; }
.talent-text { min-width: 0; }
.talent-name { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.talent-name strong { color: var(--text); font-size: 15px; font-weight: 600; }
.talent-rank { color: var(--game-green); font-size: 14px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.talent-rank.maxed { color: var(--game-yellow); }
.talent-text p { color: #aab6be; font-size: 14px; line-height: 1.45; margin: 3px 0 0; }

/* Professions: skill bar, then known recipes grouped under collapsible categories. */
.profession-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 22px 36px; align-items: start; }
.profession-heading { display: flex; justify-content: space-between; color: var(--text); font-size: 17px; }
.profession-heading span { color: #b9c3c9; font-variant-numeric: tabular-nums; }
.skill-bar { height: 6px; border-radius: 3px; background: #23384a; margin: 7px 0 6px; overflow: hidden; }
.skill-bar span { display: block; height: 100%; background: linear-gradient(90deg, #c69951, #eac57e); }
.profession details summary { color: #dcbf83; font-size: 15px; cursor: pointer; }
.profession .recipe-category summary { display: flex; align-items: center; gap: 8px; list-style: none; color: var(--gold-label); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 0; padding: 9px 8px 7px; border-bottom: 1px solid var(--divider); }
.profession .recipe-category summary::-webkit-details-marker { display: none; }
.recipe-category summary::before { content: "▸"; color: var(--text-faint); font-size: 12px; transition: transform .15s; }
.recipe-category[open] summary::before { transform: rotate(90deg); }
.recipe-category summary:hover { color: var(--gold-selected); }
.recipe-category .recipe-count { margin-left: auto; color: var(--text-faint); }
.recipe-category .equipment-list { margin-top: 6px; }

@media (max-width: 800px) {
  .talent-trees { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .character-facts { gap: 18px; width: 100%; }
}

/* Alts: the family list and the form that adds to it. */
.alts > .detail-empty { margin-bottom: 20px; }
.alt-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 8px 18px; }
.alt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border: 1px solid #2e3e4c; border-radius: 4px; background: #1a2a39; }
.remove-alt { font-size: 15px; color: var(--text-faint); }
.remove-alt:hover { color: var(--error); }
.alt-form { display: grid; gap: 8px; max-width: 520px; }
.alt-form label { color: var(--gold-label); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.alt-input-row { display: flex; gap: 8px; }
.alt-input-row input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #465460; background: #1a2a39; color: #f0f1ef; font-size: 18px; }
.alt-hint { color: var(--text-faint); font-size: 15px; margin: 0; }
.alt-form .form-error { min-height: 0; padding-top: 0; margin: 0; }
