/* Trading Control System - Frontend Styles */

.tcs-shortcode {
    margin: 20px 0;
}

.tcs-dashboard-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tcs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.tcs-stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.tcs-stat-item h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.tcs-stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.tcs-stat-value.positive {
    color: #28a745;
}

.tcs-stat-value.negative {
    color: #dc3545;
}

.tcs-transactions-list {
    margin-top: 20px;
}

.tcs-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}

.tcs-transaction-item:hover {
    background-color: #f8f9fa;
}

.tcs-transaction-item:last-child {
    border-bottom: none;
}

.tcs-transaction-info {
    flex: 1;
}

.tcs-transaction-symbol {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.tcs-transaction-details {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.tcs-transaction-profit {
    font-weight: bold;
    font-size: 16px;
}

.tcs-transaction-profit.positive {
    color: #28a745;
}

.tcs-transaction-profit.negative {
    color: #dc3545;
}

.tcs-order-type {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.tcs-order-buy {
    background: #d4edda;
    color: #155724;
}

.tcs-order-sell {
    background: #f8d7da;
    color: #721c24;
}

.tcs-chart-container {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.tcs-chart-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.tcs-no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* User Stats Widget */
.tcs-user-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

.tcs-user-stats h3 {
    margin: 0 0 20px 0;
    color: white;
    text-align: center;
}

.tcs-user-stats .tcs-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.tcs-user-stats .tcs-stat-item {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.tcs-user-stats .tcs-stat-item h4 {
    color: rgba(255,255,255,0.8);
}

.tcs-user-stats .tcs-stat-value {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tcs-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .tcs-transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tcs-transaction-profit {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .tcs-dashboard-widget,
    .tcs-chart-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .tcs-user-stats {
        padding: 20px;
    }
}

/* Loading Animation */
.tcs-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.tcs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: tcs-spin 1s linear infinite;
}

@keyframes tcs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.tcs-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
    margin: 15px 0;
}

.tcs-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin: 15px 0;
}