﻿/* =====================================================
   Modern Effects CSS — For Invest UP Incentive Calculator
   ===================================================== */

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    animation: float 15s infinite alternate ease-in-out;
}

@keyframes float {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-80px) scale(1.1);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

.fancy-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981);
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15);
    transition: all 0.4s ease;
    margin-top: 30px;
}

.glow-btn {
    position: relative;
    overflow: hidden;
}

    .glow-btn::before {
        content: "";
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        /* fallback color */
        background: #3b82f6;
        /* conic gradient (browser supported) */
        background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #10b981, #3b82f6);
        animation: spin 6s linear infinite;
        z-index: 0;
    }

    .glow-btn span {
        position: relative;
        z-index: 10;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn {
    animation: fadeInScale 0.4s ease-out;
}

#resBreakdown li:nth-child(odd) {
    background-color: #f9fafb; /* light gray row stripe */
}
body.modal-open {
    overflow: hidden;
}
/* Add to your global CSS for animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeInScale {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes pulseTotal {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.animate-pulseTotal {
    animation: pulseTotal 2s infinite;
}



/* Floating Help Button */

.chat-help-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transition: 0.3s;
    z-index: 9999;
}

    .chat-help-btn:hover {
        transform: translateY(-3px);
    }


/* ChatBot Designe CSS */

/* BODY */

body {
    font-family: 'Inter',sans-serif;
}

/* OPEN BUTTON */

.chat-open-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    transition: .3s;
}

    .chat-open-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 35px rgba(0,0,0,.25);
    }


/* OVERLAY */

.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}


/* CONTAINER */

.chat-container {
    width: 900px;
    height: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    box-shadow: 0 40px 100px rgba(0,0,0,.35);
    animation: popup .3s ease;
}

@keyframes popup {

    from {
        transform: scale(.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}


/* SIDEBAR */

.chat-sidebar {
    width: 240px;
    background: #f9fafb;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto; /* ADD THIS */
    height: 100%; /* ADD THIS */
}

.sidebar-header {
    font-weight: 600;
    margin-bottom: 15px;
}


.sidebar-btn {
    background: #d2e6d4;
    border: 1px solid #eee;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: .25s;
    width: 100%;
    text-align:left;
}

    .sidebar-btn:hover {
        background: #4CAF50;
        color: white;
        transform: translateX(4px);
    }


.sidebar-logout {
    margin-top: auto;
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}


/* MAIN */

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* IMPORTANT */
}


/* HEADER */

.chat-header {
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
}


.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}


.menu-btn {
    font-size: 20px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}


.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}


.ai-info {
    display: flex;
    align-items: center;
    gap: 10px;
}


.ai-title {
    font-weight: 600;
}


.ai-status {
    font-size: 12px;
    opacity: .8;
}


/* CHAT AREA */
.chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* IMPORTANT */
}


#chatMessages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f6f8fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
}


/* USER MESSAGE */

.user-msg {
    display: flex;
    justify-content: flex-end;
}

    .user-msg span {
        background: linear-gradient(135deg,#4CAF50,#2E7D32);
        color: white;
        padding: 10px 14px;
        border-radius: 14px 14px 2px 14px;
        max-width: 70%;
        font-size: 14px;
    }


/* BOT MESSAGE */

.bot-msg {
    display: flex;
    justify-content: flex-start;
}

    .bot-msg span {
        background: white;
        padding: 10px 14px;
        border-radius: 14px 14px 14px 2px;
        box-shadow: 0 5px 12px rgba(0,0,0,.08);
        max-width: 70%;
        font-size: 14px;
    }


/* FOOTER */

#chatMessages::-webkit-scrollbar,
.history-list::-webkit-scrollbar,
.chat-sidebar::-webkit-scrollbar {
    width: 6px;
}

#chatMessages::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb,
.chat-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}
.chat-footer {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: white;
}


#userMessage {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ddd;
}


#sendBtn {
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
}


    #sendBtn:hover {
        opacity: .9;
    }


/* LOGIN */

.login-box {
    padding: 40px;
    text-align: center;
}


    .login-box input {
        width: 100%;
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 8px;
        border: 1px solid #ddd;
    }


    .login-box button {
        width: 30%;
        padding: 10px;
        border: none;
        border-radius: 8px;
        background: #4CAF50;
        color: white;
        cursor: pointer;
    }


/* HISTORY MAIN AREA */

.history-container {
    flex: 1;
    display: flex;
    justify-content: center;
    background: #f6f8fb;
    padding: 20px;
    overflow: hidden;
}

/* CENTER CARD */

.history-wrapper {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* HEADER */

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.history-title {
    font-size: 18px;
    font-weight: 600;
}

/* BACK BUTTON */

.history-back {
    border: none;
    background: none;
    color: #4CAF50;
    font-size: 14px;
    cursor: pointer;
}
.history-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

/* SEARCH */

.history-search {
    position: relative;
    margin-bottom: 20px;
}

    .history-search input {
        width: 100%;
        padding: 10px 14px 10px 36px;
        border-radius: 10px;
        border: 1px solid #ddd;
        font-size: 14px;
    }

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* DATE */

.history-date {
    font-size: 12px;
    font-weight: 600;
    color: #777;
    margin: 12px 0 6px;
}

/* CARD */

.history-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #fafafa;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: .25s;
    border: 1px solid #eee;
}

    .history-card:hover {
        background: #f0fdf4;
        border-color: #4CAF50;
        transform: translateX(4px);
    }
.no-history {
    text-align: center;
    padding: 30px;
    color: #777;
    font-size: 14px;
}

/* TEXT */

.history-text {
    font-size: 14px;
    color: #333;
}

/* TIME */

.history-time {
    font-size: 12px;
    color: #888;
}

/* HIDE */

.hidden {
    display: none;
}
/* Floating AI Button */

.ai-chat-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white;
    border: none;
    height: 55px;
    width: 55px;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    transition: all .35s ease;
    z-index: 99999;
}

/* Icon */

.chat-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

/* Text Hidden Initially */

.chat-text {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: .35s;
}

/* Hover Expand */

.ai-chat-btn:hover {
    width: 200px;
    border-radius: 40px;
}

    /* Show Text */

    .ai-chat-btn:hover .chat-text {
        opacity: 1;
        transform: translateX(0);
    }
.ai-chat-btn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: rgba(76,175,80,.4);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {

    0% {
        transform: scale(1);
        opacity: .6
    }

    70% {
        transform: scale(1.6);
        opacity: 0
    }

    100% {
        opacity: 0
    }
}