/* Dashboard Styles */

.connection-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.banner-connected {
    background-color: #E8F5E9;
    border-left: 4px solid #27AE60;
    color: #1B5E20;
}

.banner-disconnected {
    background-color: #FFEBEE;
    border-left: 4px solid #E74C3C;
    color: #B71C1C;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #EEE;
    flex-wrap: wrap;
}

.dashboard-tab-button {
    padding: 12px 20px;
    background: transparent;
    color: #1A5276;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dashboard-tab-button:hover {
    color: #27AE60;
    border-bottom-color: #27AE60;
}

.dashboard-tab-button.active {
    color: #27AE60;
    border-bottom-color: #27AE60;
}

.dashboard-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.dashboard-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.setup-container {
    background: #F9F9F9;
    border-left: 4px solid #1976D2;
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.setup-step {
    display: inline-block;
    background-color: #1976D2;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    font-weight: bold;
    margin-right: 10px;
    font-size: 16px;
}

.setup-title {
    font-weight: 600;
    color: #1A5276;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.setup-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.command-box {
    background-color: #1A1A1A;
    color: #00FF00;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    margin: 15px 0;
    position: relative;
    overflow-x: auto;
}

.command-box code {
    display: block;
    word-wrap: break-word;
}

.btn-copy {
    background-color: #1A5276;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-copy:hover {
    background-color: #0D2C44;
}

.btn-copy.copied {
    background-color: #27AE60;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    background-color: #F5F5F5;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background-color: #27AE60;
}

.status-dot.disconnected {
    background-color: #E74C3C;
    animation: none;
}

.status-dot.testing {
    background-color: #F39C12;
}

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

.status-text {
    flex: 1;
}

.status-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.status-message {
    color: #666;
    font-size: 13px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #DDD;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #27AE60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: flex-end;
}

.examples-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #F5F5F5;
    border-radius: 4px;
}

.examples-label {
    color: #666;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.examples-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-example {
    background-color: white;
    color: #27AE60;
    border: 2px solid #27AE60;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-example:hover {
    background-color: #27AE60;
    color: white;
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    background-color: #27AE60;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary:hover {
    background-color: #229954;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #1A5276;
    border: 2px solid #1A5276;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #1A5276;
    color: white;
}

.result-item {
    background-color: #F9F9F9;
    border-left: 4px solid #27AE60;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.result-name {
    font-weight: 600;
    color: #1A5276;
}

.result-description {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.result-score {
    color: #27AE60;
    font-size: 12px;
    margin-top: 4px;
}

.tool-card {
    background-color: white;
    border: 1px solid #E0E0E0;
    border-left: 4px solid #27AE60;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tool-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left-color: #1976D2;
}

.tool-card.tool-card-highlight {
    background-color: #E8F5E9;
    border-left-color: #27AE60;
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.tool-card-name {
    font-weight: 700;
    color: #1A5276;
    font-size: 14px;
}

.tool-card-score {
    background-color: #27AE60;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.tool-card-desc {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.tool-card-params {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.param-tag {
    background-color: #E3F2FD;
    color: #1976D2;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.tool-tag {
    background-color: #F3E5F5;
    color: #7B1FA2;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.btn-run {
    background-color: #27AE60;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-run:hover {
    background-color: #229954;
    transform: translateY(-1px);
}

.latency-badge {
    background-color: #27AE60;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
    display: inline-block;
}

.error-message {
    background-color: #FFEBEE;
    border-left: 4px solid #E74C3C;
    color: #B71C1C;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.error-fix {
    background-color: #FFF3E0;
    border-left: 4px solid #F39C12;
    color: #E65100;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 13px;
    font-family: monospace;
}

.success-message {
    background-color: #E8F5E9;
    border-left: 4px solid #27AE60;
    color: #1B5E20;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.os-tabs {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.os-btn {
    padding: 8px 16px;
    border: 1px solid #DDD;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.os-btn.active {
    background-color: #1976D2;
    color: white;
    border-color: #1976D2;
}

.os-content {
    display: none;
}

.os-content.active {
    display: block;
}

.info-box {
    background-color: #E3F2FD;
    border-left: 4px solid #1976D2;
    color: #0D47A1;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.query-results-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 900px) {
    .query-results-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.history-panel {
    background-color: #F9F9F9;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E0E0E0;
}

.history-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.btn-clear-history {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-clear-history:hover {
    opacity: 1;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.history-entry {
    padding: 10px;
    margin-bottom: 8px;
    background-color: white;
    border: 1px solid #DDD;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
}

.history-entry:hover {
    background-color: #E8F5E9;
    border-color: #27AE60;
}

.history-entry-query {
    font-weight: 600;
    color: #1A5276;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-entry-meta {
    font-size: 11px;
    color: #999;
}

.history-entry-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
    margin-right: 6px;
}

.history-entry-status.success {
    background-color: #E8F5E9;
    color: #27AE60;
}

.history-entry-status.error {
    background-color: #FFEBEE;
    color: #E74C3C;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 20px 10px;
    font-size: 13px;
}

.what-is-this {
    margin-top: 25px;
    padding: 15px;
    background-color: #F5F5F5;
    border: 1px solid #DDD;
    border-radius: 4px;
}

.what-is-this summary {
    cursor: pointer;
    font-weight: 600;
    color: #1A5276;
    padding: 8px 0;
    user-select: none;
}

.what-is-this summary:hover {
    color: #27AE60;
}

.details-content {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #DDD;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

.details-content h4 {
    margin: 15px 0 10px 0;
    color: #1A5276;
    font-size: 14px;
}

.details-content p {
    margin: 10px 0;
}

.details-content ul,
.details-content ol {
    margin: 10px 0 10px 20px;
}

.details-content li {
    margin-bottom: 8px;
}

.thinking-panel {
    background: linear-gradient(135deg, #FAFBFF 0%, #F5F7FF 100%);
    border: 1px solid #E8EAFF;
    border-left: 5px solid #9C27B0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 24px;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.08);
    transition: all 0.3s ease;
}

.thinking-panel:hover {
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.12);
    border-left-color: #7B1FA2;
}

.thinking-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #E8EAFF;
}

.thinking-icon {
    font-size: 22px;
    opacity: 0.9;
}

.thinking-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #1A5276;
    letter-spacing: 0.3px;
}

.thinking-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.thinking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 5px;
    border: 1px solid rgba(156, 39, 176, 0.1);
    font-size: 13px;
    transition: all 0.2s ease;
}

.thinking-item:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(156, 39, 176, 0.2);
}

.thinking-label {
    color: #555;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.thinking-value {
    color: #1A5276;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 4px 10px;
    background-color: rgba(156, 39, 176, 0.08);
    border-radius: 4px;
    min-width: 80px;
    text-align: right;
}

.thinking-reasoning {
    margin-top: 16px;
    padding: 12px 14px;
    background-color: rgba(156, 39, 176, 0.05);
    border-left: 3px solid #9C27B0;
    border-radius: 4px;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
    font-style: normal;
}

.thinking-value.high-confidence {
    color: #1B5E20;
    background-color: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    font-weight: 800;
}

.thinking-value.medium-confidence {
    color: #E65100;
    background-color: rgba(243, 156, 18, 0.15);
    border: 1px solid rgba(243, 156, 18, 0.3);
    font-weight: 800;
}

.thinking-value.low-confidence {
    color: #B71C1C;
    background-color: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    font-weight: 800;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .os-tabs {
        flex-wrap: wrap;
    }
}
