/* Base styles */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body.dashboard-page {
    display: flex;
}

.chart-container {
    height: 500px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.chart-container:hover .chart-delete-btn {
    display: flex;
}

.chart-delete-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(255, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ff0000;
    transition: background-color 0.2s ease;
}

.chart-delete-btn:hover {
    background: rgba(255, 0, 0, 0.4);
}

.chart-description {
    background-color: #f0f7ff;
    border-left: 3px solid #4a9eff;
    padding: 10px 10px 10px 15px;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
    width: calc(100% - 18px);
    box-sizing: border-box;
    margin-left: 0;
}

.chart-description h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #2c5282;
    font-size: 16px;
}

.chart-description-container {
    background: linear-gradient(135deg, #f9f9f9, #e6e6e6);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    transition: transform 0.2s ease-in-out;
    margin: 12px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.chart-description-container h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.chart-description-container p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 4px 0;
}

.chart-description-container strong {
    color: #444;
}

.chart-details {
    border-left: 3px solid #bbb;
    padding-left: 12px;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.chart-details p {
    margin: 5px 0;
}

.chart-input {
    margin-top: auto;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.chat-input button {
    margin-top: 8px;
    padding: 10px 16px;
    font-size: 14px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-input button:hover {
    background-color: #3a7fcf;
}

.chat-input textarea {
    width: 100%;
    max-width: 100%;
    height: 80px;
    resize: none;
    padding: 8px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    overflow-x: hidden;
}

.chat-section {
    height: 75%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

.consilience-bold {
    font-weight: 700;
}

.content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
}

.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    width: 100%;
}

.dashboard-list {
    list-style-type: none;
    padding: 0;
    margin: 0 0 10px 0;
    flex: 1;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 5px;
}

.dashboard-list a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-list a.active {
    font-weight: bold;
    color: #333;
    background: linear-gradient(to right, #e0e0e0, #d0d0d0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-list a:hover {
    background-color: #e9e9e9;
}

.dashboard-list li {
    margin-bottom: 4px;
    position: relative;
}

.dashboard-list li:hover .delete-btn {
    display: flex;
}

.dashboard-section {
    height: 25%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.delete-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background-color: #ff3333;
}

.definition-details {
    margin-top: 5px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.definition-item {
    margin: 5px 0;
}

.definition-key {
    font-weight: 600;
    color: #1e293b;
    margin-right: 5px;
}

.definition-value {
    color: #334155;
}

.error-message {
    color: #d9534f;
    background-color: #f9eaea;
    border-radius: 4px;
    padding: 10px;
    margin-top: 5px;
    border-left: 3px solid #d9534f;
}

.example-queries {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.example-query-btn {
    background: white;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    max-width: 500px;
    padding: 12px 24px;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.example-query-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.new-dashboard-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.new-dashboard-btn:hover {
    background-color: #3a7fcf !important;
}

.sidebar {
    width: 300px;
    background-color: #f5f5f5;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    overflow: hidden;
    margin-left: 0;
    position: relative;
    z-index: 1;
    height: 100%;
    box-sizing: border-box;
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 40px);
}

.signal-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.signal-definition {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.signal-details {
    font-size: 13px;
    color: #888;
}

.signal-message {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

.typing-cursor {
    font-size: 14px;
    animation: blink 1s infinite;
}

.user-message {
    background-color: #e6f3e6;
    border-left: 3px solid #4caf50;
    padding: 10px 10px 10px 15px;
    margin-bottom: 10px;
    border-radius: 0 4px 4px 0;
    width: calc(100% - 18px);
    box-sizing: border-box;
    margin-left: 0;
}

.welcome-to {
    font-weight: 400;
}

welcome-view {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 800px;
    min-height: 80vh;
    padding: 40px 20px;
    text-align: center;
}

.welcome-view h1 {
    color: #333;
    font-size: 2.5em;
    font-weight: 400;
    margin-bottom: 20px;
}

.welcome-view p {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 40px;
}

/* Animations */
@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}