/* Тултипы предметов в стиле WoW */
.item-tooltip {
    position: absolute;
    z-index: 10000;
    background: linear-gradient(135deg, rgba(30, 26, 20, 0.98) 0%, rgba(20, 16, 12, 0.98) 100%);
    border: 2px solid #8a7a68;
    border-radius: 6px;
    padding: 12px 14px;
    min-width: 220px;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    font-size: 0.9em;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.15s ease-out forwards;
}

/* Закреплённый тултип — интерактивный */
.item-tooltip.item-tooltip-pinned {
    pointer-events: auto;
    z-index: 10002;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 16px rgba(155, 44, 44, 0.2);
}
.item-tooltip.item-tooltip-pinned .tooltip-use-btn {
    pointer-events: auto !important;
    opacity: 1 !important;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-tooltip-header {
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.item-tooltip-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.item-tooltip-rarity {
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-tooltip-type {
    color: var(--color-gold);
    font-size: 0.85em;
    margin-bottom: 6px;
}

.item-tooltip-desc {
    color: #ffeb3b;
    font-style: italic;
    font-size: 0.85em;
    line-height: 1.4;
    margin: 8px 0;
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.item-tooltip-effects {
    margin: 8px 0;
}

.item-tooltip-stat {
    font-size: 0.9em;
    line-height: 1.5;
    font-weight: 500;
}

.item-tooltip-duration {
    font-size: 0.8em;
    color: var(--color-text-dim);
    margin-top: 2px;
}

.item-tooltip-slot {
    color: var(--color-text-muted);
    font-size: 0.8em;
    margin-top: 6px;
    font-style: italic;
}

.item-tooltip-price {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85em;
    color: var(--color-text-dim);
}

.gold-text {
    color: var(--color-gold);
    font-weight: 600;
}

.gold-icon {
    font-size: 0.9em;
}

/* Цветная обводка слотов инвентаря по редкости */
.inventory-slot.rarity-1 {
    border-color: #8a7a68;
}

.inventory-slot.rarity-2 {
    border-color: #1eff00;
    box-shadow: 0 0 8px rgba(30, 255, 0, 0.3);
}

.inventory-slot.rarity-3 {
    border-color: #0070dd;
    box-shadow: 0 0 8px rgba(0, 112, 221, 0.3);
}

.inventory-slot.rarity-4 {
    border-color: #a335ee;
    box-shadow: 0 0 8px rgba(163, 53, 238, 0.3);
}

.inventory-slot.rarity-5 {
    border-color: #ff8000;
    box-shadow: 0 0 10px rgba(255, 128, 0, 0.4);
    animation: legendaryGlow 2s ease-in-out infinite;
}

@keyframes legendaryGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 128, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 16px rgba(255, 128, 0, 0.6);
    }
}

/* Обводка для экипированных слотов */
.eq-slot.rarity-1 .eq-name {
    color: #9d9d9d;
}

.eq-slot.rarity-2 .eq-name {
    color: #1eff00;
}

.eq-slot.rarity-3 .eq-name {
    color: #0070dd;
}

.eq-slot.rarity-4 .eq-name {
    color: #a335ee;
}

.eq-slot.rarity-5 .eq-name {
    color: #ff8000;
}

/* Картинка предмета в тултипе */
.item-tooltip-image {
    text-align: center;
    margin-bottom: 8px;
}
.item-tooltip-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

/* Кнопка действия в тултипе */
.item-tooltip-action {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.tooltip-use-btn {
    width: 100%;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1a3a1a 0%, #1a2a1a 100%);
    border: 1px solid #3a6a3a;
    border-radius: 4px;
    color: #7fff7f;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tooltip-use-btn:hover {
    background: linear-gradient(135deg, #2a5a2a 0%, #1a3a1a 100%);
    border-color: #5a9a5a;
    box-shadow: 0 0 8px rgba(60, 200, 60, 0.2);
}
.tooltip-battle-btn {
    background: linear-gradient(135deg, #3a2a1a 0%, #2a1a1a 100%);
    border-color: #8a6a3a;
    color: #ffa94d;
}
.tooltip-battle-btn:hover {
    background: linear-gradient(135deg, #5a3a1a 0%, #3a2a1a 100%);
    border-color: #aa8a4a;
    box-shadow: 0 0 8px rgba(255, 169, 77, 0.2);
}

/* Интерактивный тултип (по клику) */
.item-interactive-tooltip {
    position: fixed;
    z-index: 10001;
    background: linear-gradient(135deg, rgba(30, 26, 20, 0.98) 0%, rgba(20, 16, 12, 0.98) 100%);
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    padding: 14px;
    min-width: 240px;
    max-width: 340px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(155, 44, 44, 0.15);
    font-size: 0.9em;
    animation: tooltipFadeIn 0.15s ease-out forwards;
}
.iit-image {
    text-align: center;
    margin-bottom: 10px;
}
.iit-image img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}
.iit-info {
    margin-bottom: 10px;
}
.iit-name {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 4px;
}
.iit-qty {
    font-size: 0.8em;
    opacity: 0.6;
    font-weight: 400;
}
.iit-desc {
    font-size: 0.82em;
    color: var(--color-text-dim);
    line-height: 1.4;
    margin-bottom: 6px;
}
.iit-effect {
    font-size: 0.88em;
    color: #7fff7f;
    font-weight: 500;
}
.iit-effect-val {
    font-weight: 700;
}
.iit-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
    border: none;
}
.iit-btn-use {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
}
.iit-btn-use:hover {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}
.iit-btn-battle {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: #fff;
}
.iit-btn-battle:hover {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}
