/* AI Financial Advisory Styles */

/* Container and Content Wrapper */
.ai-advisory-container {
    background: #1e2329 !important;
    min-height: 100vh;
    padding-top: 5rem;
}

.ai-advisory-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 1200px) {
    .ai-advisory-content-wrapper {
        max-width: 1200px;
    }
}

@media (max-width: 992px) {
    .ai-advisory-content-wrapper {
        max-width: 100%;
        padding: 0 0.5rem;
    }
}

/* Header Styles */
.ai-advisory-header {
    background: linear-gradient(135deg, #3a3a52 0%, #2a2a3e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.ai-advisory-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    opacity: 0.8;
}

.ai-advisory-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.ai-advisory-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
}

.ai-advisory-header .lead {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.9);
}

.ai-status-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.learning-progress-badge {
    background: rgba(52, 152, 219, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.learning-progress-badge i {
    animation: pulse 2s infinite;
}

/* Chat Container */
.ai-chat-container {
    background: #2c3e50;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: #34495e;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #4a5f7a;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.chat-info h5 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
}

.chat-status {
    color: #bdc3c7;
    font-size: 0.9rem;
}

.chat-controls {
    margin-left: auto;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #2c3e50;
}

.welcome-message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-text {
    background: #34495e;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.message-features {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #ecf0f1;
}

.feature-item i {
    color: #3498db;
    width: 20px;
    text-align: center;
}

/* User and AI Messages */
.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.message.user-message {
    flex-direction: row-reverse;
}

.message.user-message .message-text {
    background: #3498db;
    color: white;
}

.message.user-message .message-avatar {
    background: #2980b9;
}

/* Chat Input */
.chat-input-container {
    background: #34495e;
    padding: 1rem 1.5rem;
    border-top: 1px solid #4a5f7a;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 5; /* ensure it sits above the input */
}

#typing-indicator span { white-space: nowrap; }
#typing-indicator .thinking-timer { display: inline; margin-left: 6px; opacity: 0.8; font-size: 0.85rem; }

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #3498db;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    background: #2c3e50;
    border: 1px solid #4a5f7a;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.95rem;
    resize: none;
    min-height: 45px;
    max-height: 120px;
}

#chat-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#chat-input::placeholder {
    color: #95a5a6;
}

.send-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick Actions */
.quick-actions-card {
    background: #2c3e50;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-actions-card h5 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    background: linear-gradient(135deg, #2a2a3e 0%, #1a1d29 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    min-height: 80px;
    justify-content: center;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 123, 255, 0.3);
    color: white;
    text-decoration: none;
}

.quick-action-btn i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #007bff;
}

.quick-action-btn span {
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
}

/* Premium Features */
.premium-features-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.premium-header h5 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.premium-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.premium-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.premium-feature i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.premium-feature strong {
    font-size: 0.9rem;
    display: block;
}

.premium-feature small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.premium-cta .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.premium-cta .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Recent Insights */
.recent-insights-card {
    background: #2c3e50;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recent-insights-card h5 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #34495e;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    color: #ecf0f1;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-item i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.insight-item strong {
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.25rem;
}

.insight-item small {
    font-size: 0.8rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-advisory-content-wrapper {
        padding: 0 0.5rem;
    }
    
    .ai-advisory-header {
        padding: 1.5rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .ai-advisory-header h1 {
        font-size: 2rem;
    }
    
    .ai-status-badge {
        margin-top: 1rem;
    }
    
    .ai-chat-container {
        height: 500px;
        margin-bottom: 1.5rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .ai-chat-container,
    .quick-actions-card,
    .recent-insights-card {
        background: #1a1a1a;
    }
    
    .chat-header,
    .chat-input-container {
        background: #2d2d2d;
    }
    
    .message-text {
        background: #3d3d3d;
    }
    
    .quick-action-btn {
        background: #3d3d3d;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

.message {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #34495e;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #4a5f7a;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #5a6f8a;
}

/* Feedback System */
.message-feedback {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.feedback-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.feedback-thumbs-up:hover {
    border-color: #27ae60;
    color: #27ae60;
}

.feedback-thumbs-down:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.feedback-btn i {
    font-size: 0.8rem;
}

.feedback-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    font-size: 0.9rem;
    font-style: italic;
}

.feedback-status i {
    font-size: 1rem;
}

/* Learning indicator */
.learning-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #3498db;
    margin-left: 0.5rem;
}

.learning-indicator i {
    font-size: 0.7rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced message styling */
.message.ai-message .message-content {
    position: relative;
}

.message.ai-message .message-content::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
    opacity: 0.3;
}

/* Response quality indicator */
.response-quality {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.response-quality.high {
    color: #27ae60;
}

.response-quality.medium {
    color: #f39c12;
}

.response-quality.low {
    color: #e74c3c;
}

/* Improvement notification */
.improvement-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    animation: slideInRight 0.5s ease-out;
    max-width: 300px;
}

.improvement-notification i {
    font-size: 1.1rem;
    color: #27ae60;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Learning progress animation */
.learning-progress-badge {
    position: relative;
    overflow: hidden;
}

.learning-progress-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
} 

/* Tax Management Link in Messages */
.message-tax-link {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
    text-align: center;
}

.message-tax-link .btn {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.message-tax-link small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
} 