/* =============================================================================
   edit-profile.css - Edit Profile modal: title selection + skin/portrait picker
   ============================================================================= */

/* ── Modal wrapper - matches #task-config-modal positioning ────────────────── */
#edit-profile-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-header) + 10); /* 3110 - above the header so backdrop covers everything */
    align-items: center;
    justify-content: center;
}
#edit-profile-modal.ep-modal--open {
    display: flex;
}

/* ── Section labels ────────────────────────────────────────────────────────── */
.ep-section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 14px 20px 8px;
}

/* ── Sovereign balance inline ──────────────────────────────────────────────── */
.ep-sov-balance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--font-size-xs);
    color: var(--gold);
    letter-spacing: 0.06em;
}
.ep-sov-balance img {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* ── Title selection row ───────────────────────────────────────────────────── */
.ep-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 16px;
}

.ep-title-btn {
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: rgba(200, 168, 75, 0.04);
    border: 1px solid rgba(200, 168, 75, 0.12);
    cursor: pointer;
    transition:
        border-color 0.2s,
        color 0.2s,
        background 0.2s;
}
.ep-title-btn:hover {
    border-color: rgba(200, 168, 75, 0.3);
    color: var(--text-primary);
}
.ep-title-btn--active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(200, 168, 75, 0.1);
}

/* ── Skin card row ─────────────────────────────────────────────────────────── */
.ep-skin-row {
    display: flex;
    gap: 12px;
    padding: 14px 20px 16px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 168, 75, 0.15) transparent;
}

/* ── Skin card ─────────────────────────────────────────────────────────────── */
.ep-skin-card {
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(200, 168, 75, 0.12);
    background: rgba(200, 168, 75, 0.03);
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
    position: relative;
    overflow: visible;
}
.ep-skin-card:hover {
    border-color: rgba(200, 168, 75, 0.3);
    background: rgba(200, 168, 75, 0.06);
}
.ep-skin-card--selected {
    border-color: var(--gold);
    background: rgba(200, 168, 75, 0.1);
}
.ep-skin-card--locked {
    opacity: 0.6;
    cursor: default;
}
.ep-skin-card--locked:hover {
    border-color: rgba(200, 168, 75, 0.12);
    background: rgba(200, 168, 75, 0.03);
}

/* ── Portrait image inside card ────────────────────────────────────────────── */
.ep-skin-portrait {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid rgba(200, 168, 75, 0.15);
}
.ep-skin-card--selected .ep-skin-portrait {
    border-color: var(--gold);
}
.ep-skin-card--locked .ep-skin-portrait {
    filter: grayscale(0.5) brightness(0.6);
}

/* ── Rarity badge ──────────────────────────────────────────────────────────── */
.ep-rarity-badge {
    position: absolute;
    top: -10px;
    right: -4px;
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 3px;
}
.ep-rarity-badge--common {
    background: rgba(150, 150, 150, 0.15);
    color: #999;
}
.ep-rarity-badge--rare {
    background: rgba(100, 160, 255, 0.15);
    color: #6af;
}

/* ── Skin name ─────────────────────────────────────────────────────────────── */
.ep-skin-name {
    font-size: var(--font-size-xs);
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* ── Skin action label (equipped state) ─────────────────────────────────── */
.ep-skin-action {
    font-size: var(--font-size-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: auto;
}
.ep-skin-action--current {
    color: var(--gold);
}

/* ── Unified skin card button (Equip / Buy) ────────────────────────────────── */
.ep-skin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    margin-top: 6px;
    padding: 5px 0;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition:
        background 0.2s,
        border-color 0.2s;
}
.ep-skin-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.ep-skin-btn--buy {
    color: var(--gold);
    background: rgba(200, 168, 75, 0.08);
    border-color: rgba(200, 168, 75, 0.2);
}
.ep-skin-btn--buy:hover {
    background: rgba(200, 168, 75, 0.15);
    border-color: rgba(200, 168, 75, 0.4);
}
.ep-skin-btn:disabled {
    opacity: 0.4;
    cursor: unset;
}
.ep-skin-btn img {
    width: 13px;
    height: 13px;
    opacity: 0.8;
}

/* ── Divider between sections ──────────────────────────────────────────────── */
.ep-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin: 0 20px;
}

/* ── Status feedback ───────────────────────────────────────────────────────── */
.ep-status {
    text-align: center;
    padding: 6px 20px;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    min-height: 1.2em;
}
.ep-status--error {
    color: #e57373;
}
