@font-face {
    font-family: 'FontinSmallcaps';
    src: url('../fonts/Fontin-SmallCaps.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* PoE Tooltip Styles */
.poe-hoverable {
    cursor: pointer;
    touch-action: manipulation;
}

.poe-hoverable:hover,
.poe-hoverable.touch-active,
.explicitMod.poe-hoverable:hover,
.explicitMod.poe-hoverable.touch-active,
.implicitMod.poe-hoverable:hover,
.implicitMod.poe-hoverable.touch-active,
.craftedMod.poe-hoverable:hover,
.craftedMod.poe-hoverable.touch-active {
    color: #ff6600 !important;
}

#poe-tooltip {
    position: absolute;
    background: #1e1e1e;
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 250px;
    max-width: 450px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    font-family: 'FontinSmallcaps', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #ccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    #poe-tooltip {
        max-width: calc(100vw - 40px);
        font-size: 13px;
        padding: 10px 12px;
        left: 10px !important;
        right: 10px;
        width: auto;
    }

    #poe-tooltip::before {
        display: none;
    }
}

/* Mobile tooltip backdrop to prevent click-through */
#poe-tooltip-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: transparent;
}

#poe-tooltip-backdrop.visible {
    display: block;
}

#poe-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

#poe-tooltip::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #8b4513;
}

.tooltip-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: nowrap;
}

.tooltip-left {
    flex: 1;
}

.tooltip-right {
    text-align: right;
    flex-shrink: 0;
}

.tooltip-range {
    color: #ff6600;
    font-weight: bold;
}

.tooltip-tier {
    color: #8888ff;
    font-style: italic;
}

.tooltip-ilvl {
    color: #888;
    font-size: 12px;
    font-family: sans-serif !important;
}

.tooltip-paren {
    font-family: sans-serif !important;
    font-size: 12px;
    color: #888;
}

.tooltip-annoint-effect {
    color: #ff6600;
    font-weight: normal;
}

.tooltip-divider {
    border-bottom: 2px solid #555;
    margin: 4px 0;
    width: 100%;
}

/* Vertical layout for annoint/passive tooltips */
.tooltip-annoint-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 4px;
}

.tooltip-annoint-section .tooltip-row {
    justify-content: flex-start;
    gap: 10px;
}