/**
 * Good Order History — Frontend styles v1.0.8
 */

/* =========================================================================
   Reward Points Section (Dashboard 控制台)
   ========================================================================= */

.goh-reward-section {
    margin: 0 0 30px;
    padding: 20px;
    background: #f8fdf8;
    border: 1px solid #d4edda;
    border-radius: 6px;
}

.goh-reward-heading {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
}

.goh-reward-balance {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.goh-reward-label {
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

.goh-reward-points {
    font-size: 28px;
    font-weight: 700;
    color: #2e7d32;
    font-family: Consolas, Monaco, monospace;
    line-height: 1;
}

.goh-reward-unit {
    font-size: 15px;
    color: #555;
}

/* Reward detail toggle */
.goh-reward-details {
    margin-top: 15px;
}

.goh-reward-toggle {
    cursor: pointer;
    color: #1E3A5F;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
    user-select: none;
}

.goh-reward-toggle:hover {
    color: #F4A100;
}

/* Reward history table */
.goh-reward-table {
    width: 100%;
    margin: 10px 0 0;
    border-collapse: collapse;
}

.goh-reward-table thead th {
    background: #eef7ee;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 2px solid #c8e6c9;
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.goh-reward-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e8f5e9;
    font-size: 13px;
    vertical-align: middle;
}

.goh-reward-table tbody tr:hover {
    background: #f1f8e9;
}

.goh-rw-col-date {
    width: 100px;
    color: #777;
    white-space: nowrap;
}

.goh-rw-col-desc {
    color: #333;
}

.goh-rw-col-pts {
    width: 90px;
    text-align: right;
    font-family: Consolas, Monaco, monospace;
    font-weight: 600;
}

.goh-pts-plus {
    color: #2e7d32;
}

.goh-pts-minus {
    color: #c62828;
}

/* =========================================================================
   Order History Section
   ========================================================================= */

.goh-history-wrapper {
    margin: 20px 0;
}

.goh-summary {
    margin: 0 0 15px;
    color: #555;
    font-size: 14px;
}

.goh-history-table {
    width: 100%;
    margin: 0 0 20px;
    border-collapse: collapse;
    table-layout: fixed;
}

.goh-history-table thead th {
    background: #f7f7f7;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
}

.goh-history-table tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
    vertical-align: middle;
}

.goh-history-table tbody tr:hover {
    background: #fafafa;
}

.goh-col-num {
    width: 70px;
    color: #888;
}

.goh-col-order {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    color: #1E3A5F;
    font-weight: 500;
    word-break: break-all;
    overflow-wrap: break-word;
}

.goh-col-status {
    width: 100px;
}

/* Status badges */
.goh-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.goh-status-complete {
    background: #e8f5e9;
    color: #2e7d32;
}

.goh-status-processing {
    background: #e3f2fd;
    color: #1565c0;
}

.goh-status-pending {
    background: #fff3e0;
    color: #e65100;
}

.goh-status-cancelled {
    background: #f5f5f5;
    color: #757575;
}

.goh-status-refunded {
    background: #fce4ec;
    color: #c62828;
}

.goh-status-invalid {
    background: #f5f5f5;
    color: #9e9e9e;
}

.goh-status-default {
    background: #f5f5f5;
    color: #555;
}

/* Notice */
.goh-notice {
    margin-top: 20px;
    padding: 12px 15px;
    background: #fff8e5;
    border-left: 4px solid #F4A100;
    border-radius: 2px;
}

.goh-notice p {
    margin: 0;
    color: #555;
    font-size: 14px;
}

.goh-notice strong {
    color: #333;
}

/* =========================================================================
   Mobile responsive
   ========================================================================= */

@media (max-width: 600px) {
    /* Reward balance */
    .goh-reward-section {
        padding: 15px;
    }

    .goh-reward-points {
        font-size: 24px;
    }

    /* Reward table mobile */
    .goh-reward-table thead {
        display: none;
    }

    .goh-reward-table tbody tr {
        display: block;
        margin-bottom: 8px;
        border: 1px solid #e8f5e9;
        padding: 8px;
    }

    .goh-reward-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 5px 8px;
        border-bottom: none;
    }

    .goh-reward-table tbody td::before {
        content: attr(data-title) "：";
        font-weight: 600;
        color: #555;
        white-space: nowrap;
        margin-right: 10px;
        flex-shrink: 0;
    }

    .goh-rw-col-date,
    .goh-rw-col-pts {
        width: auto;
    }

    .goh-rw-col-pts {
        text-align: right;
    }

    /* Order table mobile */
    .goh-history-table {
        table-layout: auto;
    }

    .goh-history-table thead {
        display: none;
    }

    .goh-history-table tbody tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #eaeaea;
        padding: 10px;
    }

    .goh-history-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 10px;
        border-bottom: none;
        text-align: right;
    }

    .goh-history-table tbody td::before {
        content: attr(data-title) "：";
        font-weight: 600;
        color: #555;
        white-space: nowrap;
        margin-right: 10px;
        text-align: left;
        flex-shrink: 0;
    }

    .goh-col-num,
    .goh-col-status {
        width: auto;
    }
}
