/* AI Specialist Chat Widget Styles */
:root {
    --chat-primary: #0071e3;
    --chat-secondary: #0a193c;
    --chat-accent: #7b2ff7;
    --chat-glass: rgba(10, 25, 60, 0.85);
    --chat-border: rgba(255, 255, 255, 0.15);
    --chat-user-bg: linear-gradient(135deg, #0071e3, #7b2ff7);
    --chat-ai-bg: rgba(255, 255, 255, 0.1);
}

#ai-specialist-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Floating Trigger Button */
#specialist-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chat-user-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 113, 227, 0.4);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    border: none;
    padding: 0;
    position: relative;
    overflow: hidden;
}

#specialist-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(0, 113, 227, 0.5);
}

#specialist-trigger svg {
    width: 30px;
    height: 30px;
    fill: white;
    transition: transform 0.3s;
}

#specialist-trigger.open svg {
    transform: rotate(90deg) scale(0.8);
    opacity: 0;
}

#specialist-trigger .close-icon {
    position: absolute;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s;
}

#specialist-trigger.open .close-icon {
    opacity: 1;
    transform: scale(1);
}

/* Chat Window */
#specialist-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 400px;
    height: 600px;
    background: var(--chat-glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--chat-border);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    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.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

#specialist-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Header */
#specialist-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
}

.specialist-avatar-container {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.specialist-avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--chat-primary);
    object-fit: cover;
}

.specialist-online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #2ecc71;
    border: 2px solid #0a193c;
    border-radius: 50%;
}

.specialist-info h4 {
    margin: 0;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
}

.specialist-info p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Messages */
#specialist-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

#specialist-messages::-webkit-scrollbar {
    width: 5px;
}

#specialist-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.specialist-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: specialistFadeIn 0.3s ease-out forwards;
}

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

.specialist-msg.ai {
    background: var(--chat-ai-bg);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

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

/* Options/Buttons */
.specialist-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.specialist-opt-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: left;
    transition: all 0.2s;
}

.specialist-opt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--chat-primary);
}

/* Input Area */
#specialist-input-area {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 12px;
    align-items: center;
}

#specialist-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 12px 20px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

#specialist-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

#specialist-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--chat-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

#specialist-send:hover {
    background: var(--chat-accent);
    transform: scale(1.05);
}

#specialist-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Typing indicator */
.specialist-typing {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.specialist-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: specialistBounce 1.4s infinite ease-in-out both;
}

.specialist-dot:nth-child(1) { animation-delay: -0.32s; }
.specialist-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes specialistBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Calendly Button */
.specialist-call-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    display: block;
    text-align: center;
    font-weight: 600;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: all 0.3s;
}

.specialist-call-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #specialist-window {
        width: calc(100vw - 40px);
        height: min(600px, calc(100vh - 120px));
        right: -10px;
    }
    
    #ai-specialist-widget {
        bottom: 20px;
        right: 20px;
    }
}
