/* ===== Shared Chatbot Styles - Friday AI ===== */
#chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-toggle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--teal-gradient, linear-gradient(135deg, #00b4a0, #008a7a));
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 180, 160, 0.4);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 8px 30px rgba(0, 180, 160, 0.6);
}

.chat-toggle .chat-label {
    display: none;
    position: absolute;
    right: 80px;
    background: var(--navy-dark, #0a1628);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInLabel 0.3s ease;
}

.chat-toggle:hover .chat-label {
    display: block;
}

@keyframes fadeInLabel {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.chat-toggle .notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #ff4757;
    border-radius: 50%;
    border: 3px solid var(--navy-dark, #0a1628);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Chat window is fixed to viewport so it floats correctly on every page */
.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 550px;
    max-height: calc(100vh - 140px);
    background: var(--navy-dark, #0a1628);
    border-radius: 16px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-window.open {
    display: flex;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    padding: 16px 20px;
    background: var(--navy, #0d1f3c);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--teal-gradient, linear-gradient(135deg, #00b4a0, #008a7a));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.chat-header h4 {
    color: white;
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.chat-status {
    color: #2ecc71;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat-close {
    background: none;
    border: none;
    color: var(--gray-400, #7a8a9a);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.chat-messages {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gray-300, #4a5a6a);
    border-radius: 2px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 85%;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; }

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-700, #dde5ed);
    word-wrap: break-word;
}

.message.bot .message-content {
    background: rgba(255, 255, 255, 0.06);
    color: var(--gray-600, #c5d0da);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.message.bot .message-content strong { color: var(--white); }
.message.bot .message-content p { margin: 0 0 6px 0; }
.message.bot .message-content ul { margin: 6px 0; padding-left: 20px; }
.message.bot .message-content ul li {
    list-style: none;
    margin: 4px 0;
    color: var(--gray-400, #7a8a9a);
}
.message.bot .message-content ul li::before {
    content: "• ";
    color: var(--teal, #00b4a0);
    font-weight: bold;
}

.message.user .message-content {
    background: var(--teal-gradient, linear-gradient(135deg, #00b4a0, #008a7a));
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray-400, #7a8a9a);
    margin-top: 4px;
    padding: 0 4px;
    opacity: 0.7;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    max-width: 80px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--gray-400, #7a8a9a);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.chat-input-area {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.quick-replies {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.quick-reply {
    padding: 5px 12px;
    background: rgba(0, 180, 160, 0.1);
    border: 1px solid rgba(0, 180, 160, 0.15);
    border-radius: 20px;
    color: var(--teal, #00b4a0);
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.quick-reply:hover {
    background: var(--teal-gradient, linear-gradient(135deg, #00b4a0, #008a7a));
    color: white;
    border-color: var(--teal, #00b4a0);
    transform: translateY(-2px);
}

.chat-input-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input-wrap input {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 25px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.chat-input-wrap input::placeholder { color: var(--gray-400, #7a8a9a); }
.chat-input-wrap input:focus {
    border-color: var(--teal, #00b4a0);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 180, 160, 0.05);
}

.chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal-gradient, linear-gradient(135deg, #00b4a0, #008a7a));
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 180, 160, 0.4);
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 480px;
        right: 20px;
        bottom: 100px;
    }
    .chat-toggle {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .chat-toggle .chat-label { display: none !important; }
    .quick-replies { gap: 4px; }
    .quick-reply { font-size: 0.65rem; padding: 4px 10px; }
}