/* ==========================================================================
   AI Career & Productivity Assistant Floating UI & Drawer Styling
   ========================================================================== */

/* Fixed Floating Action Buttons Container */
.ai-floating-buttons-wrapper {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1060; /* Above normal content & headers */
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-end;
}

/* Individual Floating Action Button */
.ai-fab-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 4px 10px -2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.ai-fab-btn .fab-icon {
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

.ai-fab-btn:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 14px 30px -5px rgba(79, 70, 229, 0.4);
}

.ai-fab-btn:active {
    transform: translateY(0) scale(0.95);
}

/* FAB Theme Colors */
.fab-career {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
}

.fab-resume {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
}

.fab-assistant {
    background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
    color: #ffffff;
}

/* FAB Tooltip */
.fab-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #0f172a;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fab-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #0f172a;
}

.ai-fab-btn:hover .fab-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Offcanvas Drawer Customization */
.ai-offcanvas {
    width: min(500px, 94vw) !important;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15) !important;
}

.bg-light-soft {
    background-color: #f8fafc;
}

/* Chat Messages Formatting */
.ai-chat-messages-container {
    display: flex;
    flex-direction: column;
}

.chat-message-item {
    display: flex;
    margin-bottom: 1rem;
    animation: fadeInMsg 0.3s ease forwards;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message-item.user {
    justify-content: flex-end;
}

.chat-message-item.user .msg-content-box {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 10px 16px;
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.5;
}

.chat-message-item.assistant .msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-message-item.assistant .msg-content-box {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 4px;
    border-top-right-radius: 16px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 12px 16px;
    max-width: 85%;
    font-size: 0.92rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Typing Indicator Dots */
.typing-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 7px;
    height: 7px;
    background-color: #6366f1;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Resume Evaluator Dashboards */
.border-dashed {
    border: 2px dashed #cbd5e1 !important;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.border-dashed:hover {
    border-color: #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.03);
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.score-total {
    font-size: 0.75rem;
    opacity: 0.8;
}

.cursor-pointer {
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .ai-floating-buttons-wrapper {
        bottom: 18px;
        right: 18px;
        gap: 10px;
    }

    .ai-fab-btn {
        width: 48px;
        height: 48px;
    }

    .ai-fab-btn .fab-icon {
        font-size: 1.25rem;
    }

    .fab-tooltip {
        display: none; /* Hide tooltips on touch devices */
    }

    .ai-offcanvas {
        width: 100vw !important;
        border-radius: 0 !important;
    }
}
