/* =============================================
   FAB.CSS — Floating Action Button (Mascot)
   ============================================= */

/* --- WRAPPER --- */
.floating-mascot-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

/* --- MAIN BUTTON --- */
.mascot-btn {
    position: relative;
    cursor: pointer;
    animation: mascotFloat 3.5s ease-in-out infinite alternate;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-smooth);
}

.mascot-img-container {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.15));
    transition: var(--transition-smooth);
}

.mascot-img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-smooth);
}

/* --- TOOLTIP SPEECH BUBBLE --- */
.mascot-tooltip {
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: var(--transition-smooth);
    position: absolute;
    bottom: calc(100% + 5px);
}

/* Speech bubble arrow */
.mascot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: rgba(15, 23, 42, 0.95);
}

/* --- HOVER STATES (main button) --- */
.mascot-btn:hover .mascot-tooltip {
    opacity: 1;
    transform: translateY(-5px) scale(1);
}

.mascot-btn:hover .mascot-img-container {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.25));
}

/* --- FAB MENU --- */
.fab-menu {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px) scale(0.8);
    transition: var(--transition-smooth);
    margin-bottom: 0.2rem;
}

/* --- FAB ITEMS --- */
.fab-item {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--accent-indigo);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    position: relative;
}

/* Tooltip labels on FAB items */
.fab-item::before {
    content: attr(title);
    position: absolute;
    right: 52px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fab-item:hover::before {
    opacity: 1;
    transform: translateX(-3px);
}

.fab-item:hover {
    background: var(--accent-indigo);
    color: #ffffff;
    border-color: var(--accent-indigo);
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(99, 102, 241, 0.3);
}

/* --- ACTIVE STATE --- */
.floating-mascot-fab.active .fab-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.floating-mascot-fab.active .mascot-btn {
    animation-play-state: paused;
}

.floating-mascot-fab.active .mascot-img-container {
    transform: scale(1.05) rotate(-5deg);
}
