/* Chatbot Container */
#wehired-chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

#wehired-chatbot-container.wehired-chat-closed {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* Header */
#wehired-chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, #2a4365));
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.bot-details {
    display: flex;
    flex-direction: column;
}

.bot-name {
    font-weight: 700;
    font-size: 16px;
}

.bot-status {
    font-size: 11px;
    opacity: 0.8;
}

#wehired-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#wehired-chat-close:hover {
    opacity: 1;
}

/* Body */
#wehired-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#wehired-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

.chat-msg-bot {
    background: white;
    color: #2d3748;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.chat-msg-user {
    background: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Chatbot Advanced Formatting */
.chat-msg-bot b {
    color: var(--primary-color);
}

.job-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
    border-left: 4px solid #25D366;
}

.job-link {
    display: inline-block;
    background: #25D366;
    color: white !important;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    transition: background 0.2s;
}

.job-link:hover {
    background: #1eb956;
}

#wehired-chat-typing {
    font-size: 12px;
    color: #718096;
    padding: 5px 10px;
}

/* Footer */
#wehired-chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #edf2f7;
    display: flex;
    gap: 10px;
}

#wehired-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}

#wehired-chat-input:focus {
    border-color: var(--primary-color);
}

#wehired-chat-send {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

#wehired-chat-send:hover {
    transform: scale(1.05);
}

/* Toggle Link */
#wehired-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    border: none;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

#wehired-chat-toggle:hover {
    transform: scale(1.1);
}

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