/* Page sheet for item.php. Linked after style.css by includes/css.php,
   so these rules win ties against the shared sheet. */

.char-wrap { animation: charIn 0.45s ease-out; }
@keyframes charIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Item hero ───────────────────────────────────── */.item-emblem {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.05), rgba(255,255,255,0.015) 70%);
    border: 1px solid rgba(201,168,76,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 6px 18px rgba(0,0,0,0.35);
    color: var(--gold);
    overflow: hidden;
}
.item-sprite {
    display: block;
    width: auto;
    height: auto;
    max-width: 104px;
    max-height: 96px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.55));
}
.item-sub {
    color: var(--text-dim);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
/* Category pill in the hero — links to that chart on armor/weapons/jewelry */
.item-type {
    display: inline-block;
    padding: 3px 11px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    color: var(--text-dim);
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}
.item-type:visited { color: var(--text-dim); }
.item-type:hover { border-color: var(--accent); color: var(--text-main); }
.item-headline {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.item-headline small { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; letter-spacing: 0.05em; }

/* ── Section heading (matches player.php) ─────────── */
.sec-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 38px 0 16px;
    color: var(--text-mid);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.sec-head::before {
    content: '';
    width: 3px;
    height: 13px;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}
.sec-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
}

/* ── Stat grid (matches player.php) ───────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.stat-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-height: 1.6rem;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
/* Free-text stat cell ("Quest", "Vicar Vharmes, Vicar Asgoth") */
.stat-value.txt {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

/* Prose panel: potion effect, bonus, full set, description, where to find */
.text-box {
    padding: 18px 22px;
    line-height: 1.6;
    color: var(--text-mid);
    font-size: 0.95rem;
}

.qty-cell { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Embedded so NPC/monster links in "Where to Find" are themed (never blue/purple) */
.npc-link { color: var(--sage); text-decoration: none; transition: color 0.15s; }
.npc-link:visited { color: var(--sage); }
.npc-link:hover { color: #8aaa78; text-decoration: underline; text-underline-offset: 3px; }
.monster-link { color: var(--sage); text-decoration: none; transition: color 0.15s; }
.monster-link:visited { color: var(--sage); }
.monster-link:hover { color: #8aaa78; text-decoration: underline; text-underline-offset: 3px; }

/* Owner markers in the owners list */
.guild-tag, .auction-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 3px;
    vertical-align: middle;
}
.guild-tag {
    color: var(--sage);
    border: 1px solid rgba(111,143,95,0.40);
}
.auction-tag {
    color: var(--accent);
    border: 1px solid var(--accent-glow);
}

/* "Make offer" pill in an owner row (other players' items; signed-out
   visitors get the same pill pointed at register.php) */
.pm-offer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 10px;
    padding: 3px 10px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,0.4);
    border-radius: 999px;
    text-decoration: none;
    vertical-align: middle;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.pm-offer-btn:hover { border-color: var(--gold); background: rgba(201,168,76,0.1); }
.pm-offer-icon { flex-shrink: 0; opacity: 0.9; }

/* ── Item effects (with hover tooltip) ─────────────── */
.effects-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.effect-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: rgba(18, 18, 20, 0.55);
    border: 1px solid rgba(201,168,76,0.35);
    border-radius: 999px;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: help;
    transition: border-color 0.18s, transform 0.18s, background 0.18s;
}
.effect-chip:hover,
.effect-chip:focus {
    border-color: rgba(201,168,76,0.7);
    background: rgba(28, 24, 16, 0.7);
    transform: translateY(-1px);
}
.effect-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 260px;
    max-width: 340px;
    padding: 12px 14px;
    background: rgba(12, 12, 14, 0.96);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.55);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 20;
    white-space: normal;
}
.effect-chip:hover .effect-tip,
.effect-chip:focus .effect-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.effect-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border-light);
}
.effect-tip dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; }
.effect-tip dt {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0;
}
.effect-tip dd { margin: 0; color: var(--text-main); }

@media (max-width: 600px) {
    .sec-head { margin: 30px 0 14px; }
    .sec-head::after { display: none; }
}
