/* Info Tooltip Component */
.info-tooltip-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 4px;
}

.info-tooltip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6c757d;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    font-style: italic;
    line-height: 1;
    transition: background 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.info-tooltip-btn:hover,
.info-tooltip-wrapper.active .info-tooltip-btn {
    background: #0d6efd;
}

.info-tooltip-content {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: normal;
    font-style: normal;
    line-height: 1.4;
    width: max-content;
    max-width: 280px;
    min-width: 150px;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    text-align: left;
    word-wrap: break-word;
}

.info-tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

.info-tooltip-wrapper.active .info-tooltip-content {
    display: block;
}

/* Мобильные стили */
@media (max-width: 767px) {
    .info-tooltip-content {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        transform: none;
        max-width: 100%;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        font-size: 14px;
        max-height: 50vh;
        overflow-y: auto;
    }

    .info-tooltip-content::after {
        display: none;
    }

    .info-tooltip-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
    }

    .info-tooltip-overlay.active {
        display: block;
    }
}
