/* ================================================================
   firstTimeHint.css — Animated first-time user onboarding tooltips
   ================================================================ */

.fth-hint {
    --fth-arrow-left: 24px;
    --fth-accent:     #4db8e8;
    --fth-accent2:    #0090c8;
    --fth-bg:         rgba(16, 20, 30, 0.97);
    --fth-border:     rgba(77, 184, 232, 0.35);
}

/* ── Container ── */
.fth-hint {
    position: fixed;
    z-index: 99999;
    width: 270px;
    padding: 18px 18px 16px 16px;
    box-sizing: border-box;
    border-radius: 14px;

    background: var(--fth-bg);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.00) 60%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 8px  rgba(0, 0, 0, 0.4),
        0 0  0 1px var(--fth-border);

    display: flex;
    align-items: flex-start;
    gap: 12px;

    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    transition:
        opacity   0.32s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

/* ── Arrow UP (hint is below anchor) ── */
.fth-hint.fth-arrow-top {
    border-top: 2px solid var(--fth-accent);
}

.fth-hint.fth-arrow-top::before {
    content: '';
    position: absolute;
    top: -13px;
    left: var(--fth-arrow-left);
    border-left:  10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 13px solid var(--fth-accent);
    filter: drop-shadow(0 -2px 4px rgba(77, 184, 232, 0.35));
}

.fth-hint.fth-arrow-top::after {
    content: '';
    position: absolute;
    top: -10px;
    left: calc(var(--fth-arrow-left) + 2px);
    border-left:  8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 11px solid rgba(16, 20, 30, 0.97);
}

/* ── Arrow DOWN (hint is above anchor) ── */
.fth-hint.fth-arrow-bottom {
    border-bottom: 2px solid var(--fth-accent);
}

.fth-hint.fth-arrow-bottom::before {
    content: '';
    position: absolute;
    bottom: -13px;
    left: var(--fth-arrow-left);
    border-left:  10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 13px solid var(--fth-accent);
    filter: drop-shadow(0 2px 4px rgba(77, 184, 232, 0.35));
}

.fth-hint.fth-arrow-bottom::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: calc(var(--fth-arrow-left) + 2px);
    border-left:  8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 11px solid rgba(16, 20, 30, 0.97);
}

/* ── Visible state ── */
.fth-hint.fth-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* arrow-bottom entrance: slides up instead of down */
.fth-hint.fth-arrow-bottom {
    transform: translateY(8px) scale(0.97);
}
.fth-hint.fth-arrow-bottom.fth-visible {
    transform: translateY(0) scale(1);
}

/* ── Exit animation ── */
.fth-hint.fth-exit {
    opacity: 0 !important;
    transform: translateY(-6px) scale(0.96) !important;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.fth-hint.fth-arrow-bottom.fth-exit {
    transform: translateY(6px) scale(0.96) !important;
}

/* ── Icon ring ── */
.fth-icon-ring {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fth-accent2), var(--fth-accent));
    box-shadow:
        0 0 0 3px rgba(77, 184, 232, 0.18),
        0 0 14px rgba(77, 184, 232, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    animation: fth-pulse 2.2s ease-in-out infinite;
}

/* Green variant for the + hint */
.fth-accent-green {
    --fth-accent:  #3ecf8e;
    --fth-accent2: #1a9e68;
    --fth-border:  rgba(62, 207, 142, 0.35);
}
.fth-accent-green .fth-icon-ring {
    background: linear-gradient(135deg, #1a9e68, #3ecf8e);
    box-shadow:
        0 0 0 3px rgba(62, 207, 142, 0.18),
        0 0 14px rgba(62, 207, 142, 0.35);
    animation: fth-pulse-green 2.2s ease-in-out infinite;
}

@keyframes fth-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(77,184,232,0.18), 0 0 14px rgba(77,184,232,0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(77,184,232,0.10), 0 0 22px rgba(77,184,232,0.55); }
}
@keyframes fth-pulse-green {
    0%,100% { box-shadow: 0 0 0 3px rgba(62,207,142,0.18), 0 0 14px rgba(62,207,142,0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(62,207,142,0.10), 0 0 22px rgba(62,207,142,0.55); }
}

/* ── Text content ── */
.fth-content { flex: 1; min-width: 0; }

.fth-title {
    margin: 0 0 5px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--fth-accent);
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.fth-body {
    margin: 0;
    font-size: 11.5px;
    color: #c8d6e5;
    line-height: 1.55;
}

.fth-body strong { color: #fff; font-weight: 600; }
.fth-body .fa    { font-size: 11px; opacity: 0.85; }

/* ── Close button ── */
.fth-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #8898aa;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.fth-close:hover { background: rgba(255,255,255,0.18); color: #fff; }
