/* AI Assistant Widget Styles */
.ai-assistant-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 240px; /* Reduced from 400px (60%) */
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px; /* Reduced from 16px */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.ai-assistant-widget.loaded {
    opacity: 1;
    transform: translateY(0);
}

.ai-assistant-widget.minimized {
    width: auto;
    height: auto;
    min-width: 180px; /* Compact minimized state */
}

.ai-assistant-widget.minimized .ai-assistant-header {
    padding: 8px 12px; /* Smaller header when minimized */
}

/* Header */
.ai-assistant-header {
    background: #4A90E2;
    padding: 10px 14px; /* Reduced from 16px 20px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.ai-assistant-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Reduced from 40px */
    height: 32px; /* Reduced from 40px */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px; /* Reduced from 8px */
}

.ai-assistant-header-actions {
    display: flex;
    gap: 8px;
}

.ai-assistant-header-actions button {
    background: transparent;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    line-height: 1;
}

.ai-assistant-header-actions button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Content */
.ai-assistant-content {
    padding: 16px; /* Reduced from 24px */
    max-height: 400px; /* Reduced from 600px */
    overflow-y: auto;
}

.ai-assistant-title {
    font-size: 18px; /* Reduced from 24px */
    font-weight: 700;
    color: #4A90E2;
    margin: 0 0 6px 0; /* Reduced from 8px */
}

.ai-assistant-subtitle {
    font-size: 13px; /* Reduced from 16px */
    color: #666;
    margin: 0 0 10px 0; /* Reduced from 16px */
    font-weight: 500;
}

.ai-assistant-description {
    font-size: 12px; /* Reduced from 14px */
    color: #666;
    line-height: 1.5; /* Reduced from 1.6 */
    margin: 0 0 16px 0; /* Reduced from 24px */
}

/* Action Buttons Grid */
.ai-assistant-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px; /* Reduced from 12px */
}

.ai-assistant-action-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px; /* Reduced from 12px */
    padding: 10px 8px; /* Reduced from 16px */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Reduced from 8px */
    text-align: center;
    font-family: inherit;
}

.ai-assistant-action-btn:hover {
    border-color: #4A90E2;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.ai-assistant-action-icon {
    font-size: 24px; /* Reduced from 32px */
    line-height: 1;
}

.ai-assistant-action-label {
    font-size: 11px; /* Reduced from 13px */
    font-weight: 500;
    color: #333;
    line-height: 1.2; /* Reduced from 1.3 */
}

/* Response Content */
.ai-assistant-response-container {
    animation: fadeIn 0.3s ease;
}

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

.ai-assistant-response {
    color: #333;
}

.ai-assistant-response h3 {
    font-size: 20px;
    font-weight: 700;
    color: #4A90E2;
    margin: 0 0 16px 0;
}

.ai-assistant-response p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 12px 0;
}

.ai-assistant-response ul {
    margin: 12px 0;
    padding-left: 20px;
}

.ai-assistant-response li {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 8px;
}

.ai-assistant-response a {
    color: #4A90E2;
    text-decoration: none;
    font-weight: 500;
}

.ai-assistant-response a:hover {
    text-decoration: underline;
}

.ai-assistant-back-btn {
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s ease;
    font-family: inherit;
}

.ai-assistant-back-btn:hover {
    background: #357ABD;
}

/* FAQ Styles */
.ai-assistant-faq {
    margin: 16px 0;
}

.ai-assistant-faq details {
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
}

.ai-assistant-faq summary {
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 0;
    list-style: none;
    position: relative;
    padding-left: 24px;
}

.ai-assistant-faq summary::before {
    content: '+';
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #4A90E2;
}

.ai-assistant-faq details[open] summary::before {
    content: '−';
}

.ai-assistant-faq details p {
    margin-top: 8px;
    padding-left: 24px;
    font-size: 13px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ai-assistant-widget {
        width: calc(100vw - 40px);
        max-width: 240px; /* Reduced from 400px */
        bottom: 10px;
        right: 10px;
    }
    
    .ai-assistant-actions {
        grid-template-columns: 1fr;
    }
    
    .ai-assistant-content {
        padding: 14px; /* Reduced from 20px */
        max-height: 70vh;
    }
}

/* Scrollbar Styling */
.ai-assistant-content::-webkit-scrollbar {
    width: 6px;
}

.ai-assistant-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ai-assistant-content::-webkit-scrollbar-thumb {
    background: #4A90E2;
    border-radius: 10px;
}

.ai-assistant-content::-webkit-scrollbar-thumb:hover {
    background: #357ABD;
}