/* IRT Chatbot Styles */
:root {
    --bot-primary: #14b8a6; /* Match site teal */
    --bot-secondary: #0f172a; /* Slate 900 */
    --bot-accent: #f97316; /* Site orange */
    --bot-bg: rgba(248, 250, 252, 0.9);
}

.irt-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.irt-chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--bot-primary) 0%, #0d9488 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.irt-chatbot-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--bot-primary);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% { transform: scale(1.5); opacity: 0; }
}

.irt-chatbot-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

.irt-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: var(--bot-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
}

.irt-chatbot-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.irt-chatbot-header {
    background: var(--bot-secondary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.irt-chatbot-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
}

.irt-chatbot-header-info {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.irt-chatbot-logo {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    object-fit: contain;
}

.irt-chatbot-title {
    font-weight: 800;
    font-size: 17px;
    margin: 0;
    letter-spacing: -0.5px;
    color: #ffffff;
}

.irt-chatbot-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.irt-chatbot-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.irt-chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    z-index: 10;
    padding: 5px;
    transition: opacity 0.2s;
}

.irt-chatbot-close-btn:hover {
    opacity: 1;
}

.irt-chatbot-footer {
    padding: 10px;
    text-align: center;
    background: white;
    font-size: 10px;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
}

.irt-chatbot-footer a {
    color: var(--bot-primary);
    font-weight: 700;
    text-decoration: none;
}

.irt-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.irt-chatbot-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

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

.irt-chatbot-msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.irt-chatbot-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--bot-primary) 0%, #0d9488 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}

.irt-chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.irt-chatbot-qr-btn {
    background: white;
    color: var(--bot-secondary);
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.irt-chatbot-qr-btn:hover {
    border-color: var(--bot-primary);
    background: var(--bot-primary);
    color: white;
    transform: translateY(-2px);
}

.irt-chatbot-analysis-state {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 5px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

.irt-chatbot-typing {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: white;
    border-radius: 20px;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    margin-bottom: 5px;
}

.irt-chatbot-dot {
    width: 6px;
    height: 6px;
    background: var(--bot-primary);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite;
    opacity: 0.4;
}

.irt-chatbot-dot:nth-child(2) { animation-delay: 0.2s; }
.irt-chatbot-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.4); opacity: 1; }
}

.irt-chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.irt-chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.irt-chatbot-input:focus {
    border-color: var(--bot-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.1);
}

.irt-chatbot-send {
    background: var(--bot-secondary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.irt-chatbot-send:hover {
    background: var(--bot-primary);
    transform: scale(1.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .irt-chatbot-container { bottom: 15px; right: 15px; }
    .irt-chatbot-window {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%; border-radius: 0; border: none;
    }
}
