/* ============================================================
   Action Tooltip  –  appears above a button after an action,
   inspired by the Copilot inline-prompt style.
   ============================================================ */

.action-tooltip-anchor {
    position: relative;
    display: inline-block; /* wraps tightly around the button */
}

/* The floating card */
.action-tooltip {
    position: absolute;
    bottom: calc(100% + 10px); /* 10 px gap above the button */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;

    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;

    background: #1e1e2e;
    color: #e2e2f0;
    border: 1px solid #3c3c5a;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);

    /* hidden by default */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateX(-50%) translateY(4px);
}

/* Arrow pointing downward */
.action-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e1e2e;
}

/* Visible state */
.action-tooltip.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Icon slot (optional SVG / emoji / bootstrap icon) */
.action-tooltip-icon {
    flex-shrink: 0;
    font-size: 0.95rem;
    line-height: 1;
}

/* Main text */
.action-tooltip-text {
    flex: 1 1 auto;
}

/* Optional inline action buttons  (e.g. "Undo", "Open") */
.action-tooltip-actions {
    display: flex;
    gap: 4px;
    margin-left: 4px;
}

.action-tooltip-btn {
    background: transparent;
    border: 1px solid #5a5a7a;
    border-radius: 5px;
    color: #a8b4ff;
    font-size: 0.78rem;
    padding: 2px 8px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}

.action-tooltip-btn:hover {
    background: #3a3a5a;
    color: #ffffff;
}

/* Close (×) button */
.action-tooltip-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.12s;
}

.action-tooltip-close:hover {
    color: #ffffff;
}

/* Variant – success tint */
.action-tooltip.tooltip-success {
    background: #0d2818;
    border-color: #1a5c33;
    color: #9effc5;
}
.action-tooltip.tooltip-success::after {
    border-top-color: #0d2818;
}

/* Variant – warning tint */
.action-tooltip.tooltip-warning {
    background: #2a1f00;
    border-color: #6b4f00;
    color: #ffd87a;
}
.action-tooltip.tooltip-warning::after {
    border-top-color: #2a1f00;
}

/* Variant – error tint */
.action-tooltip.tooltip-error {
    background: #2a0d0d;
    border-color: #6b1a1a;
    color: #ffaaaa;
}
.action-tooltip.tooltip-error::after {
    border-top-color: #2a0d0d;
}

/* Variant – info (default) tint */
.action-tooltip.tooltip-info {
    background: #0a1f35;
    border-color: #1a4a7a;
    color: #a8d4ff;
}
.action-tooltip.tooltip-info::after {
    border-top-color: #0a1f35;
}
