/* Trading AI Chat - EXAKTE stelaroX UI */

* {
    box-sizing: border-box;
}

/* Container */
.trading-ai-chat-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #1a2332;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    margin: 20px auto;
    border: 1px solid #2a3444;
}

/* Chat Header */
.trading-ai-chat-header {
    background: #1f2937;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a3444;
}

.chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-title-section h3 {
    color: #ffffff;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9ca3af;
    font-size: 13px;
    margin-top: 2px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.chat-expand-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.chat-expand-btn:hover {
    color: #ffffff;
}

/* Disclaimer */
.trading-ai-disclaimer {
    background: rgba(255, 165, 0, 0.1);
    padding: 12px 20px;
    border-bottom: 1px solid #2a3444;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.disclaimer-icon {
    color: #ffa500;
    font-size: 18px;
}

/* Chat Messages */
.trading-ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #151d2b;
}

.trading-ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.trading-ai-chat-messages::-webkit-scrollbar-track {
    background: #1a2332;
}

.trading-ai-chat-messages::-webkit-scrollbar-thumb {
    background: #2a3444;
    border-radius: 3px;
}

/* Messages */
.chat-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease;
}

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

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    color: white;
}

.user-message .message-avatar {
    background: #2a3444;
}

.message-content {
    max-width: 80%;
}

.user-message .message-content {
    display: flex;
    justify-content: flex-end;
}

.message-bubble {
    background: #1f2937;
    border: 1px solid #2a3444;
    border-radius: 12px;
    padding: 16px;
    color: #ffffff;
    line-height: 1.6;
}

.user-message .message-bubble {
    background: #00d4ff;
    border-color: #00d4ff;
}

.message-header {
    margin-bottom: 12px;
    color: #00ff88;
}

.message-bubble p {
    margin: 8px 0;
    color: #e5e7eb;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.feature-list li {
    padding: 6px 0;
    color: #e5e7eb;
}

.feature-list li strong {
    color: #ffffff;
}

.message-cta {
    margin-top: 12px;
    color: #ffffff !important;
}

/* Loading */
.trading-ai-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #1f2937;
    color: #9ca3af;
    font-size: 13px;
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: #00d4ff;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

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

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

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

/* Chat Input */
.trading-ai-chat-input {
    background: #1f2937;
    padding: 16px 20px 20px 20px;
    border-top: 1px solid #2a3444;
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

#chat-input {
    flex: 1;
    background: #151d2b;
    border: 1px solid #2a3444;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    color: #ffffff;
    resize: none;
    max-height: 120px;
    transition: all 0.2s;
}

#chat-input::placeholder {
    color: #6b7280;
}

#chat-input:focus {
    outline: none;
    border-color: #00d4ff;
}

.send-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #00ff88 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.send-btn:active {
    transform: translateY(0);
}

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

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.quick-action-btn {
    background: #151d2b;
    border: 1px solid #2a3444;
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.quick-action-btn:hover {
    background: #1f2937;
    border-color: #00d4ff;
}

.action-icon {
    font-size: 18px;
}

.action-text {
    font-size: 11px;
    font-weight: 500;
}

/* Market Data Cards */
.market-data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.market-data-card {
    background: #1f2937;
    border: 1px solid #2a3444;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s;
}

.market-data-card:hover {
    border-color: #00d4ff;
    transform: translateY(-2px);
}

.market-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.market-data-symbol {
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
}

.market-data-exchange {
    font-size: 10px;
    color: #6b7280;
    background: #151d2b;
    padding: 2px 6px;
    border-radius: 4px;
}

.market-data-price {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 8px 0;
}

.market-data-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.market-data-change.positive {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.market-data-change.negative {
    background: rgba(255, 51, 102, 0.15);
    color: #ff3366;
}

.trading-signal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 8px;
}

.trading-signal.buy {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.trading-signal.sell {
    background: rgba(255, 51, 102, 0.2);
    color: #ff3366;
}

.market-data-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #2a3444;
}

.market-data-stat {
    display: flex;
    flex-direction: column;
}

.market-data-stat-label {
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.market-data-stat-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
}

/* Error Message */
.error-message {
    background: rgba(255, 51, 102, 0.15);
    border-left: 3px solid #ff3366;
    padding: 12px;
    border-radius: 6px;
    color: #ff3366;
    margin: 8px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .trading-ai-chat-container {
        border-radius: 0;
        height: 100vh !important;
        margin: 0;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .message-content {
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .quick-actions {
        grid-template-columns: 1fr;
    }
}
