/*!
 * SYTypewrapTooltip (sy-typewrap-tooltip/v0.3.css)
 * CDN-ready utility for animated typewrap tooltips.
 *
 * © 2026 Hovsep Hambardzumyan. All rights reserved.
 * This software is proprietary and confidential.
 * Unauthorized copying, modification, distribution, or use of this file is strictly prohibited.
 * This code may be used only with explicit written permission from the author.
 */

.tooltip-body{
    display:flex;
    min-height:40px;
    flex-direction:column;
    transition:height .2s linear;
    justify-content:space-between;
    overflow:hidden; /* важно для плавной высоты */
}

/* typewrap is a child, NOT the same element as .tooltip-body */
.typewrap{
    font-size:13px;
    letter-spacing:.1px;
    display:block;
}

/* word animation */
.typewrap .word{
    opacity:0;
    display:inline-block;
    filter:blur(2px) saturate(1.05);
    transform:translateY(6px) scale(.98);
    transition:opacity .70s ease, transform .70s ease, filter .70s ease;
}

.typewrap .word.in{
    opacity:1;
    filter:blur(0);
    transform:translateY(0) scale(1);
}

.typewrap .word.hide-word-anim{
    opacity:0;
    transform:translateY(6px) scale(.98);
    filter:blur(2px) saturate(1.05);
}

/* -----------------------------
   Tooltip shell (supports buttons)
----------------------------- */
.sy-tooltip{
    position:fixed;
    z-index:9999;

    min-width:0;
    width:max-content;
    max-width:min(520px, calc(100vw - 16px));

    padding:12px 14px;
    border-radius:14px;
    /*background:#0f1722;*/
    background:#FFFFFF;
    /*color:#e6eef8;*/
    color: #232323;
    /*border:1px solid rgba(255,255,255,.08);*/
    border: 1px solid rgba(255, 255, 255, .06);
    /*box-shadow:0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(122, 92, 255, .18) inset;*/
    box-shadow:  0 10px 30px rgba(0, 0, 0, .25);

    opacity:0;
    transform:translateY(8px);
    filter:blur(3px);

    white-space:normal;
    word-break:break-word;

    pointer-events:none; /* hidden state */
    transition:opacity .18s ease, transform .18s ease, filter .18s ease;
}

.sy-tooltip.sy-tooltip--show{
    opacity:1;
    transform:translateY(0);
    filter:blur(0);
    pointer-events:auto; /* ✅ buttons work */
}

.sy-tooltip.sy-tooltip--measure{
    transition:none !important;
    opacity:0 !important;
    transform:translateY(8px) !important;
    filter:blur(3px) !important;
    pointer-events:none !important;
}


/* header area: logo + title */
.sy-tt-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}

.sy-tt-logo{
    display:none; /* включается из JS */
    width:28px;
    height:28px;
}

.sy-tt-logo svg{
    width:100%;
    height:100%;
    display:block;
}

.sy-tt-title{
    font-size:13px;
    font-weight:700;
    letter-spacing:.1px;
    /*color:rgba(230,238,248,.95);*/
    color: #232323;
}

/* footer (optional) */
.sy-tt-footer{
    margin-top:10px;
    font-size:10px;
    color:rgba(255,255,255,.18);
    display:none; /* если захочешь — включишь своей темой */
}

/* button styling inside tooltip (minimal) */
.sy-tooltip button,
.sy-tooltip .sy-tt-btn{
    appearance:none;
    border:1px solid rgba(228, 228, 228, 0.36);
    background: rgba(241, 241, 241, 0.25);
    color: #232323;
    padding:6px 10px;
    border-radius:10px;
    cursor:pointer;
    font:inherit;
}

.sy-tooltip button:hover,
.sy-tooltip .sy-tt-btn:hover{
    background:rgba(255,255,255,.10);
    border-color:rgba(122,92,255,.35);
}
.sy-tooltip{
    transition:
            opacity .18s ease,
            transform .18s ease,
            filter .18s ease,
            width .20s linear;   /* ✅ */

    transition: transform .3s ease-in-out, opacity .3s ease-in-out, filter .3s ease-in-out, width .3s ease-in-out;
}

.tooltip-body{
    transition: height .20s linear; /* ✅ */
    overflow: hidden;
}

.sy-tt-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
}


/* sy-typewrap-tooltip v0.4.0 */

/* your working block */
.tooltip-body{
    gap: 5px;
    display:flex;
    overflow:hidden;
    min-height:40px;
    flex-direction:column;
    transition:height .2s linear;
    justify-content: flex-start;
}

.typewrap{
    font-size:13px;
    letter-spacing:.1px;
}

.typewrap .word{
    opacity:0;
    display:inline-block;
    filter:blur(2px) saturate(1.05);
    transform:translateY(6px) scale(.98);
    transition:opacity .70s ease, transform .70s ease, filter .70s ease;
}

.typewrap .word.in{
    opacity:1;
    filter:blur(0);
    transform:translateY(0) scale(1);
}

/* tooltip shell */
.sy-tooltip{
    position:fixed;
    z-index:9999;

    min-width: 200px;
    width:max-content;
    max-width:min(520px, calc(100vw - 16px));

    padding:12px 14px;
    border-radius:14px;

    /*background:#0f1722;*/
    background:#FFFFFF;
    /*color:#e6eef8;*/
    color: #232323;
    /*border:1px solid rgba(255,255,255,.08);*/
    border: 1px solid rgba(255, 255, 255, .06);
    /*box-shadow:0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(122, 92, 255, .18) inset;*/
    box-shadow:  0 10px 30px rgba(0, 0, 0, .25);

    opacity:0;
    pointer-events:none;
    transform:translateY(8px);
    filter:blur(3px);
    transition:opacity .18s ease, transform .18s ease, filter .18s ease;

    white-space:normal;
    word-break:break-word;
}

.sy-tooltip.sy-tooltip--show{
    opacity:1;
    transform:translateY(0);
    filter:blur(0);
    pointer-events:auto;
}

/* header area: logo + title (YOUR styles) */
.sy-tt-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}

.sy-tt-logo{
    display:none; /* включается из JS */
    width:28px;
    height:28px;
}

.sy-tt-logo svg{
    width:100%;
    height:100%;
    display:block;
}

.sy-tt-title{
    font-size:13px;
    font-weight:700;
    letter-spacing:.1px;
    color: #232323;
}

/* footer (optional) */
.sy-tt-footer{
    margin-top:10px;
    font-size:10px;
    color:rgba(255,255,255,.18);
    display:none; /* включается из JS (showFooter) */
}
