/**
 * MyAiSchool Learning Tools - Global Frontend Styles
 *
 * This stylesheet provides styles for all public-facing components,
 * such as the user dashboard.
 *
 * @package MyAiSchool_Learning_Tools
 * @since 2.0.0
 */

/* ==========================================================================
   User Dashboard Container
   ========================================================================== */
.myaischool-lt-user-dashboard-wrap {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px 30px;
    max-width: 800px;
    margin: 30px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.myaischool-lt-user-dashboard-wrap h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

.myaischool-lt-user-dashboard-wrap p.dashboard-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* ==========================================================================
   Credit Balance Display
   ========================================================================== */
.myaischool-lt-credit-balance {
    background-color: #f5f7fa;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.myaischool-lt-credit-balance h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 500;
    color: #555;
}

.myaischool-lt-credit-balance .balance-value {
    font-size: 36px;
    font-weight: 700;
    color: #0073aa;
    margin: 0;
    line-height: 1.2;
}

/* ==========================================================================
   Usage History Table
   ========================================================================== */
.myaischool-lt-user-dashboard-wrap h3.usage-history-title {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.myaischool-lt-user-usage-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.myaischool-lt-user-usage-table th,
.myaischool-lt-user-usage-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.myaischool-lt-user-usage-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.myaischool-lt-user-usage-table td {
    font-size: 14px;
    color: #555;
}

.myaischool-lt-user-usage-table tbody tr:last-child td {
    border-bottom: none;
}

.myaischool-lt-user-usage-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Credit transaction coloring */
.myaischool-lt-user-usage-table .cost.added {
    color: #28a745; /* Green for credits added */
    font-weight: bold;
}

.myaischool-lt-user-usage-table .cost.deducted {
    color: #dc3545; /* Red for credits deducted */
    font-weight: bold;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 600px) {
    .myaischool-lt-user-dashboard-wrap {
        padding: 20px;
    }

    .myaischool-lt-user-usage-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
