/* Phronesis Chatbot Styles */
#phronesis-container {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    z-index: 999999 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#phronesis-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(65, 105, 225, 0.4);
    border: 2px solid var(--gold);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

#phronesis-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 30px rgba(65, 105, 225, 0.5);
}

#phronesis-chat {
    display: none;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
    animation: chatSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid rgba(0,0,0,0.05);
}

#phronesis-chat.active {
    display: flex;
}

@keyframes chatSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.chat-header {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    text-align: left;
    border-bottom: 2px solid var(--gold);
    display: flex;
    align-items: center;
}

.chat-header h5 {
    margin: 0;
    font-weight: 800;
    font-size: 18px;
    color: white;
}

.chat-header span {
    font-size: 12px;
    opacity: 0.8;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f9f9fb;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.msg-bot {
    background: #eef2ff;
    color: #2c3e50;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid #dbeafe;
}

.msg-user {
    background: var(--primary-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(65, 105, 225, 0.2);
}

.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #e1e8ed;
    border-radius: 25px;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-footer button {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    #phronesis-chat {
        width: calc(100vw - 40px);
        height: 450px;
        right: -5px;
    }
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #eef2ff;
    border-radius: 18px;
    width: fit-content;
    align-self: flex-start;
}

.typing span {
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
    opacity: 0.6;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}