/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.suggestion-item {
    padding: 12px;
    border-bottom: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: #333;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-ticker {
    font-weight: bold;
    color: #fff;
    font-size: 14px;
}

.suggestion-name {
    color: #ccc;
    font-size: 12px;
    margin-top: 2px;
}

.suggestion-sector {
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.no-suggestions {
    padding: 12px;
    color: #666;
    font-size: 12px;
    text-align: center;
}

.modal-search {
    position: relative;
    margin-bottom: 20px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #666;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Input Area */
.input-container {
    padding: 20px;
    flex-shrink: 0;
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
}

.chat-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 6px 15px;
    color: #e3e3e3;
    font-size: 15px;
    resize: none;
    max-height: 200px;
    overflow-y: auto;
    line-height: 1.4;
    height: auto;
}

.chat-input:focus {
    outline: none;
}

/* Input actions bar */
.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
}

.send-button {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #888;
}

.send-button:hover {
    color: #caa999;
    background: rgba(202, 169, 153, 0.1);
}

/* Upload Button */
.upload-button {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #888;
}

.upload-button:hover {
    color: #caa999;
    background: rgba(202, 169, 153, 0.1);
}

.upload-button.uploading {
    opacity: 0.5;
    pointer-events: none;
}

/* Document Card (inside input area, Claude-style vertical) */
.document-chip {
    display: flex;
    flex-direction: column;
    width: 72px;
    height: 90px;
    background: #1e1e2e;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    z-index: 5;
    overflow: hidden;
    margin: 8px 12px;
    flex-shrink: 0;
}

.document-chip .doc-chip-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252535;
}

.document-chip .doc-chip-ext {
    background: #e85d04;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* File type colors */
.document-chip .doc-chip-ext[data-ext="pdf"] { background: #dc2626; }
.document-chip .doc-chip-ext[data-ext="doc"],
.document-chip .doc-chip-ext[data-ext="docx"] { background: #2563eb; }
.document-chip .doc-chip-ext[data-ext="txt"] { background: #6b7280; }
.document-chip .doc-chip-ext[data-ext="png"],
.document-chip .doc-chip-ext[data-ext="jpg"],
.document-chip .doc-chip-ext[data-ext="jpeg"] { background: #7c3aed; }

.document-chip .doc-chip-footer {
    padding: 6px 8px;
    background: #1e1e2e;
    border-top: 1px solid #3a3a4a;
}

.document-chip .doc-chip-name {
    color: #aaa;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.document-chip .doc-chip-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.document-chip .doc-chip-remove:hover {
    background: #ff6b6b;
    color: white;
}

/* Document chip inside chat message */
.message-document {
    display: inline-flex;
    flex-direction: column;
    width: 72px;
    height: 90px;
    background: #1e1e2e;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.message-document .doc-chip-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #252535;
}

.message-document .doc-chip-ext {
    background: #e85d04;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-document .doc-chip-ext[data-ext="pdf"] { background: #dc2626; }
.message-document .doc-chip-ext[data-ext="doc"],
.message-document .doc-chip-ext[data-ext="docx"] { background: #2563eb; }
.message-document .doc-chip-ext[data-ext="txt"] { background: #6b7280; }
.message-document .doc-chip-ext[data-ext="png"],
.message-document .doc-chip-ext[data-ext="jpg"],
.message-document .doc-chip-ext[data-ext="jpeg"] { background: #7c3aed; }

.message-document .doc-chip-footer {
    padding: 6px 8px;
    background: #1e1e2e;
    border-top: 1px solid #3a3a4a;
}

.message-document .doc-chip-name {
    color: #aaa;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* Document chip is now in flex flow, no padding adjustment needed */

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a2e;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-notification .toast-icon {
    font-size: 18px;
    font-weight: bold;
}

.toast-notification .toast-message {
    color: #e3e3e3;
    font-size: 14px;
}

.toast-success {
    border-color: #00dd77;
}
.toast-success .toast-icon {
    color: #00dd77;
}

.toast-error {
    border-color: #ff6b6b;
}
.toast-error .toast-icon {
    color: #ff6b6b;
}

.toast-info {
    border-color: #7CC3E4;
}
.toast-info .toast-icon {
    color: #7CC3E4;
}

/* Suggestions System - Vertical List */
.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px 20px;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(26, 26, 46, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(124, 195, 228, 0.2);
}

.suggestions-container.hidden {
    display: none;
}

.suggestions-title {
    font-size: 13px;
    color: #caa999;
    margin-bottom: 8px;
    font-weight: 500;
}

.suggestion-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.suggestion-btn::before {
    content: '\2192';
    opacity: 0.5;
}

.suggestion-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #777;
    color: #aaa;
}

.suggestion-btn:active {
    transform: translateY(0);
}

.suggestion-btn .suggestion-icon {
    font-size: 14px;
    opacity: 0.6;
}

/* Quick Actions - Initial Chat Buttons */
.quick-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    position: fixed;
    bottom: 120px;
    left: 60px;
    right: 0;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 100;
    box-sizing: border-box;
    transition: left 0.3s ease;
}

.quick-action-btn {
    background: transparent;
    border: 1px solid #555;
    color: #888;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #777;
    color: #aaa;
}

.quick-action-btn:active {
    transform: translateY(0);
}

.quick-action-btn .qa-icon {
    font-size: 16px;
}

/* Loading */
.spinner {
    border: 2px solid #2a2a2a;
    border-top: 2px solid #8b5cf6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

/* Scrollbar styling */
.alerts-list::-webkit-scrollbar,
.alert-detail-left::-webkit-scrollbar,
.alert-detail-right::-webkit-scrollbar,
.chat-container::-webkit-scrollbar,
.position-detail-view::-webkit-scrollbar,
.portfolio-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.alerts-list::-webkit-scrollbar-track,
.alert-detail-left::-webkit-scrollbar-track,
.alert-detail-right::-webkit-scrollbar-track,
.chat-container::-webkit-scrollbar-track,
.position-detail-view::-webkit-scrollbar-track,
.portfolio-content-wrapper::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.alerts-list::-webkit-scrollbar-thumb,
.alert-detail-left::-webkit-scrollbar-thumb,
.alert-detail-right::-webkit-scrollbar-thumb,
.chat-container::-webkit-scrollbar-thumb,
.position-detail-view::-webkit-scrollbar-thumb,
.portfolio-content-wrapper::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

.alerts-list::-webkit-scrollbar-thumb:hover,
.alert-detail-left::-webkit-scrollbar-thumb:hover,
.alert-detail-right::-webkit-scrollbar-thumb:hover,
.chat-container::-webkit-scrollbar-thumb:hover,
.position-detail-view::-webkit-scrollbar-thumb:hover,
.portfolio-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #444;
}
