/* NGX Group Display Plugin Styles - Investor Dashboard */

.ngx-group-container {
    width: 100%;
    margin: 20px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Market Summary Dashboard */
.ngx-market-summary {
    /* Background color removed */
    padding: 25px;
    /* Box shadow removed */
}

.ngx-market-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
}

.ngx-last-updated {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

/* Stock Grid Layout - Center aligned cards */
.ngx-stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

/* When only one card, center it */
.ngx-stock-grid:only-child {
    display: flex;
    justify-content: center;
}

/* For grids with 1 or 2 cards, center them */
@media (min-width: 641px) {
    .ngx-stock-grid:has(> :nth-child(1):last-child) {
        grid-template-columns: minmax(300px, 400px);
        justify-content: center;
    }
    
    .ngx-stock-grid:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(300px, 400px));
        justify-content: center;
    }
}

/* Individual Stock Card - Each stock gets its own card */
.ngx-stock-card {
    background: #0E335E;
    border-radius: 0px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid #B9B9B97A;
}

.ngx-stock-card:hover {
    transform: translateY(-3px);
    background: #124473;
    border-color: #B9B9B9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ngx-stock-symbol {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ngx-asset-type {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.ngx-stock-price {
    font-size: 16px;
    font-weight: 700;
    color: #7ED2FF;
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
}

.ngx-stock-change {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.ngx-stock-change.positive {
    color: #00c853;
    background: rgba(0, 200, 83, 0.15);
}

.ngx-stock-change.negative {
    color: #ff3b30;
    background: rgba(255, 59, 48, 0.15);
}

.ngx-stock-change.neutral {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.15);
}

.ngx-stock-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 12px;
    margin-top: 5px;
}

.ngx-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
}

.ngx-meta-label {
    font-weight: 500;
}

.ngx-meta-value {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.ngx-market-note {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.ngx-market-note small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    font-family: 'Inter', sans-serif;
}

/* No data message */
.ngx-no-data {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
}

/* Fallback Mode Styles */
.ngx-fallback-mode .ngx-fallback-wrapper {
    text-align: center;
    padding: 0px; /* Padding removed */
}

.ngx-fallback-icon {
    margin-bottom: 20px;
}

.ngx-fallback-icon img {
    width: 6%; /* Icon width set to 6% */
    height: auto;
    max-width: 60px; /* Maximum width to prevent it from becoming too large */
    min-width: 30px; /* Minimum width for very small screens */
}

.ngx-fallback-title {
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 20px !important; /* Updated font size */
    font-weight: 600;
    margin-bottom: 0px;
    margin-top: 0px;
    text-align: center;
    padding-top: 10px; /* Added padding-top */
    padding-bottom: 10px; /* Added padding-bottom */
}

.ngx-fallback-message {
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 16px;
    text-align: center;
    margin: 0;
    padding-bottom: 20px; /* Added padding-bottom */
}

.ngx-debug-info {
    display: block;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.6) !important;
    font-family: 'Inter', sans-serif !important;
    text-align: center;
    font-size: 12px;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .ngx-market-summary {
        padding: 15px;
    }
    
    /* Center the Last Updated on mobile */
    .ngx-market-header {
        justify-content: center;
    }
    
    .ngx-last-updated {
        margin-left: 0 !important; /* Override any margin-left auto */
        text-align: center;
    }
    
    .ngx-stock-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Center single card on mobile */
    .ngx-stock-grid:has(> :nth-child(1):last-child) {
        display: flex;
        justify-content: center;
    }
    
    .ngx-stock-card {
        padding: 20px;
    }
    
    .ngx-stock-price {
        font-size: 16px;
    }
    
    .ngx-stock-change {
        font-size: 13px;
    }
    
    /* Fallback responsive adjustments */
    .ngx-fallback-icon img {
        width: 12%; /* Slightly larger on mobile for better visibility */
        min-width: 40px;
    }
    
    .ngx-fallback-title {
        font-size: 18px !important;
    }
    
    .ngx-fallback-message {
        font-size: 14px;
        padding-bottom: 15px;
    }
}

/* For medium screens with 2 cards */
@media (min-width: 769px) and (max-width: 1024px) {
    .ngx-stock-grid:has(> :nth-child(2):last-child) {
        grid-template-columns: repeat(2, minmax(300px, 450px));
    }
}

/* Large screens - icon sizing */
@media (min-width: 1025px) {
    .ngx-fallback-icon img {
        width: 6%;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ngx-stock-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Stagger animation for cards */
.ngx-stock-card:nth-child(1) { animation-delay: 0.05s; }
.ngx-stock-card:nth-child(2) { animation-delay: 0.1s; }
.ngx-stock-card:nth-child(3) { animation-delay: 0.15s; }
.ngx-stock-card:nth-child(4) { animation-delay: 0.2s; }
.ngx-stock-card:nth-child(5) { animation-delay: 0.25s; }
.ngx-stock-card:nth-child(6) { animation-delay: 0.3s; }