/**
 * Algerian Stock Trading CSS
 */

.ast-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.ast-header {
    text-align: center;
    margin-bottom: 30px;
}

.ast-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.ast-current-price {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 20px;
}

/* Chart Container */
.ast-chart-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#stockChart {
    width: 100%;
    height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Trading Interface */
.ast-trading-interface {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.ast-trading-interface h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.ast-trading-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.ast-form-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.ast-form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #34495e;
}

.ast-form-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.ast-form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.ast-buttons {
    display: flex;
    gap: 10px;
}

.ast-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ast-btn-buy {
    background-color: #27ae60;
    color: white;
}

.ast-btn-buy:hover {
    background-color: #229954;
}

.ast-btn-sell {
    background-color: #e74c3c;
    color: white;
}

.ast-btn-sell:hover {
    background-color: #c0392b;
}

.ast-total-display {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-top: 10px;
}

/* Transactions Table */
.ast-transactions {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ast-transactions h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.ast-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.ast-table th,
.ast-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.ast-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.ast-table tr:hover {
    background-color: #f8f9fa;
}

.ast-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ast-container {
        padding: 10px;
    }
    
    .ast-trading-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ast-form-group {
        min-width: auto;
    }
    
    .ast-buttons {
        justify-content: center;
    }
    
    .ast-btn {
        flex: 1;
        max-width: 150px;
    }
    
    #stockChart {
        height: 300px;
    }
    
    .ast-table {
        font-size: 14px;
    }
    
    .ast-table th,
    .ast-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .ast-current-price {
        font-size: 20px;
    }
    
    .ast-chart-container {
        padding: 10px;
    }
    
    .ast-trading-interface {
        padding: 15px;
    }
    
    .ast-transactions {
        padding: 15px;
    }
    
    #stockChart {
        height: 250px;
    }
    
    .ast-table {
        font-size: 12px;
    }
    
    .ast-table th,
    .ast-table td {
        padding: 6px;
    }
}

/* Loading States */
.ast-loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.ast-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.ast-success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

