/* Simple Quantbot enhancements */

/* Market status bar - non-sticky with close button */
.quantbot-market-status {
    background: linear-gradient(135deg, #37474f 0%, #455a64 100%);
    color: white;
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
    border-bottom: 1px solid #ffc107;
    position: relative;  /* Changed from sticky */
    z-index: 1000;
    display: block;
}

.quantbot-market-status.hidden {
    display: none;
}

.market-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: relative;
}

.market-close-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #b0bec5;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.market-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.market-close-btn::before {
    content: '×';
    font-weight: bold;
    line-height: 1;
}

.market-label {
    color: #b0bec5;
}

.market-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.market-status.open {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.market-status.closed {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.market-time {
    color: #ffc107;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
}

/* Enhanced dashboard cards */
.dashboard-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Portfolio metrics styling */
.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.portfolio-metric {
    background: linear-gradient(135deg, #37474f 0%, #455a64 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.portfolio-metric h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.portfolio-metric .value {
    font-size: 1.8em;
    font-weight: 700;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.portfolio-metric .change {
    font-size: 0.8em;
    margin-top: 4px;
}

/* Financial indicators */
.profit {
    color: #4caf50;
    font-weight: 600;
}

.loss {
    color: #f44336;
    font-weight: 600;
}

.neutral {
    color: #9e9e9e;
    font-weight: 500;
}

.price {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 600;
    font-size: 1.1em;
}

/* News cards */
.news-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid #ffc107;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.news-card.bullish {
    border-left-color: #4caf50;
}

.news-card.bearish {
    border-left-color: #f44336;
}

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

.news-title {
    font-weight: 600;
    color: #37474f;
    font-size: 1em;
    line-height: 1.4;
}

.news-time {
    font-size: 0.8em;
    color: #9e9e9e;
    white-space: nowrap;
    margin-left: 12px;
}

.sentiment-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.sentiment-badge.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.sentiment-badge.negative {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.sentiment-badge.neutral {
    background: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
}

/* Market status indicators */
.market-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-status.open {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.market-status.closed {
    background: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.market-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

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

/* Notification animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Header cursor hint when market bar is hidden */
.md-header {
  transition: all 0.3s ease;
}

.quantbot-market-status.hidden + .md-header {
  cursor: pointer;
}

.quantbot-market-status.hidden + .md-header:hover::after {
  content: "💡 Double-click to restore market status";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}
    .quantbot-market-status {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    
    .portfolio-summary {
        grid-template-columns: 1fr;
    }
    
    .news-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .news-time {
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .dashboard-card {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .news-card {
    background: #2d2d2d;
    color: #e0e0e0;
}

[data-md-color-scheme="slate"] .news-title {
    color: #e0e0e0;
}

/* Notification animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Header cursor hint when market bar is hidden */
.md-header {
  transition: all 0.3s ease;
}

.quantbot-market-status.hidden + .md-header {
  cursor: pointer;
}

.quantbot-market-status.hidden + .md-header:hover::after {
  content: "💡 Double-click to restore market status";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}
