/* RaysBot Floating Chatbot Styles */

#raysbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Outfit', sans-serif;
}

#raysbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color, #F59E0B);
    color: var(--white, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    outline: none;
}

#raysbot-toggle:hover {
    transform: scale(1.05);
    background-color: #d97706; /* slightly darker amber */
}

#raysbot-toggle .fa-times {
    display: none;
}

#raysbot-toggle.active .fa-robot {
    display: none;
}

#raysbot-toggle .fa-robot {
    animation: bot-wave 4s infinite ease-in-out;
    transform-origin: bottom center;
}

@keyframes bot-wave {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(15deg); }
    20% { transform: rotate(-10deg); }
    30% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    50% { transform: rotate(0deg); }
}

#raysbot-toggle.active .fa-times {
    display: block;
}

#raysbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 100px);
    background-color: var(--white, #ffffff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

#raysbot-window.active {
    display: flex;
    animation: slideUpFade 0.3s ease forwards;
}

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

#raysbot-header {
    background-color: var(--primary-color, #0F172A);
    color: var(--white, #ffffff);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#raysbot-header .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

#raysbot-header .title img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#raysbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--light-bg, #F8FAFC);
}

.bot-message, .user-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.bot-message {
    align-self: flex-start;
    background-color: #ffffff;
    color: var(--secondary-color, #0F172A);
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 2px;
}

.bot-message strong {
    color: var(--primary-color, #0F172A);
}

.bot-message a {
    color: var(--accent-color, #F59E0B);
    text-decoration: none;
    font-weight: 600;
}

.bot-message a:hover {
    text-decoration: underline;
}

.user-message {
    align-self: flex-end;
    background-color: var(--primary-color, #0F172A);
    color: var(--white, #ffffff);
    border-bottom-right-radius: 2px;
}

.bot-program-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.bot-program-card h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    color: var(--primary-color, #0F172A);
}

.bot-program-card p {
    margin: 0 0 8px 0;
    font-size: 0.8rem;
    color: var(--text-light, #64748B);
}

.bot-program-card a.bot-btn {
    display: inline-block;
    background-color: var(--accent-color, #F59E0B);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

.bot-program-card a.bot-btn:hover {
    background-color: #d97706;
    color: #fff;
    text-decoration: none;
}

#raysbot-input-area {
    padding: 15px;
    background-color: var(--white, #ffffff);
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#raysbot-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

#raysbot-input:focus {
    border-color: var(--tech-blue, #38BDF8);
}

#raysbot-send {
    background-color: var(--primary-color, #0F172A);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#raysbot-send:hover {
    background-color: #1e293b;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-self: flex-start;
    background-color: #ffffff;
    padding: 10px 14px;
    border-radius: 10px;
    border-bottom-left-radius: 2px;
    border: 1px solid #e2e8f0;
    gap: 4px;
    align-items: center;
}

.typing-indicator.active {
    display: flex;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-light, #64748B);
    border-radius: 50%;
    animation: typing 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 typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #raysbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
    }
}
