/* ===================================
   TOOL TIPS - Estilo minimalista Viizor
   =================================== */

.tool-tip-bubble {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(64, 64, 64, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    overflow: hidden;
}

.tool-tip-bubble.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Expandido - ancho completo */
.tool-tip-bubble:not(.collapsed) {
    width: 360px;
    max-width: calc(100vw - 48px);
}

/* Estado colapsado - solo título visible */
.tool-tip-bubble.collapsed {
    width: auto;
    max-height: 44px;
    cursor: pointer;
}

.tool-tip-bubble.collapsed .tool-tip-body,
.tool-tip-bubble.collapsed .tool-tip-footer {
    display: none;
}

.tool-tip-bubble.collapsed .tool-tip-header {
    padding: 8px 12px;
    border-bottom: none;
    transition: padding 0.3s ease;
    display: block;
    text-align: center;
}

.tool-tip-bubble.collapsed .tool-tip-close {
    display: none;
}

.tool-tip-bubble.collapsed .tool-tip-title {
    display: inline-flex;
}

/* Transiciones suaves para expandir */
.tool-tip-bubble:not(.collapsed) .tool-tip-body,
.tool-tip-bubble:not(.collapsed) .tool-tip-footer {
    opacity: 1;
    max-height: 500px;
    transition: opacity 0.3s ease 0.1s, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tip-bubble:not(.collapsed) .tool-tip-close {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease 0.2s;
}

/* Header */
.tool-tip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(64, 64, 64, 0.5);
}

.tool-tip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.01em;
}

.tool-tip-title i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.tool-tip-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tool-tip-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
}

/* Body */
.tool-tip-body {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    max-height: 380px;
    overflow-y: auto;
    transition: opacity 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tip-steps {
    margin: 0 0 6px 0;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.tool-tip-steps li {
    margin-bottom: 2px;
}

.tool-tip-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 8px;
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.6);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.tool-tip-note i,
.tool-tip-note svg {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
    margin-top: 0;
}

.tool-tip-protip {
    padding: 5px 8px;
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.7);
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}

.tool-tip-protip strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.tool-tip-footer {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-top: 1px solid rgba(64, 64, 64, 0.5);
    transition: opacity 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-tip-footer button {
    flex: 1;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.tool-tip-hide-session {
    background: rgba(64, 64, 64, 0.5);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(64, 64, 64, 0.8);
}

.tool-tip-hide-session:hover {
    background: rgba(74, 74, 74, 0.6);
    color: rgba(255, 255, 255, 0.9);
}

.tool-tip-hide-permanent {
    background: rgba(26, 26, 26, 0.8);
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(64, 64, 64, 0.8);
}

.tool-tip-hide-permanent:hover {
    background: rgba(36, 36, 36, 0.9);
    color: rgba(255, 255, 255, 0.8);
}

/* Scrollbar minimalista */
.tool-tip-body::-webkit-scrollbar {
    width: 4px;
}

.tool-tip-body::-webkit-scrollbar-track {
    background: transparent;
}

.tool-tip-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.tool-tip-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .tool-tip-bubble {
        width: calc(100vw - 32px);
        bottom: 16px;
        left: 16px;
    }

    .tool-tip-footer {
        flex-direction: column;
    }

    .tool-tip-footer button {
        width: 100%;
    }
}
