/**
 * EG-Billing Member Portal — Frontend Styles
 *
 * Mobile-first, minimal, theme-friendly.
 * All classes prefixed with egb- to avoid conflicts.
 */

/* ── Portal Container ─────────────────────────────────────────── */

.egb-portal {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: inherit;
    line-height: 1.6;
}

.egb-portal-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e4e7;
}

.egb-portal-title {
    font-size: 1.5em;
    margin: 0 0 8px;
}

.egb-portal-subtitle {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

/* ── Login/No-Member Notices ──────────────────────────────────── */

.egb-portal-login,
.egb-portal-no-member {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
}

.egb-portal-login p,
.egb-portal-no-member p {
    margin: 0 0 16px;
    font-size: 1.1em;
    color: #444;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.egb-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s;
}

.egb-btn-primary {
    background: #0073aa;
    color: #fff;
    border-color: #006799;
}

.egb-btn-primary:hover {
    background: #005d8c;
    color: #fff;
}

.egb-btn-small {
    padding: 4px 12px;
    font-size: 0.85em;
    background: #f1f1f1;
    color: #333;
    border-color: #ccc;
}

.egb-btn-small:hover {
    background: #e2e4e7;
    color: #000;
}

/* ── Invoice Table ────────────────────────────────────────────── */

.egb-invoice-list {
    margin: 20px 0;
}

.egb-invoice-list-empty {
    text-align: center;
    padding: 30px;
    color: #666;
    background: #f9f9f9;
    border-radius: 6px;
}

.egb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.egb-table thead {
    background: #f1f1f1;
}

.egb-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #555;
    border-bottom: 2px solid #ddd;
}

.egb-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.egb-table tbody tr:hover {
    background: #f9f9f9;
}

.egb-col-amount {
    text-align: right;
    white-space: nowrap;
}

.egb-col-status {
    text-align: center;
}

.egb-col-actions {
    text-align: right;
}

/* ── Status Badges ────────────────────────────────────────────── */

.egb-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.egb-status-paid {
    background: #d4edda;
    color: #155724;
}

.egb-status-open {
    background: #fff3cd;
    color: #856404;
}

.egb-status-draft {
    background: #e2e4e7;
    color: #555;
}

.egb-status-cancelled {
    background: #f8d7da;
    color: #721c24;
    text-decoration: line-through;
}

/* ── Pagination ───────────────────────────────────────────────── */

.egb-pagination {
    margin: 20px 0;
    text-align: center;
}

.egb-pagination-link {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
}

.egb-pagination-link:hover {
    background: #f1f1f1;
}

.egb-pagination-active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.egb-pagination-active:hover {
    background: #005d8c;
    color: #fff;
}

/* ── Responsive (Mobile-First) ────────────────────────────────── */

@media (max-width: 600px) {
    .egb-portal {
        padding: 10px;
    }

    .egb-table {
        font-size: 0.85em;
    }

    .egb-table th,
    .egb-table td {
        padding: 8px 6px;
    }

    /* Hide period column on mobile */
    .egb-col-period {
        display: none;
    }

    .egb-btn-small {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

@media (max-width: 400px) {
    .egb-table th,
    .egb-table td {
        padding: 6px 4px;
        font-size: 0.8em;
    }
}
