/*
 * PMP frontend overrides for the TAG Gaming theme.
 *
 * The theme uses a dark page background with white card containers for
 * forms and receipts. PMP's default colors collide with this in two ways:
 *
 *  1. Body text on the page background renders too dark to read (PMP
 *     paragraphs on the confirmation/account pages inherit a low-contrast
 *     muted color that disappears against the dark theme).
 *  2. Headings and form labels inside the white cards inherit the
 *     theme's near-white color, which makes them invisible on white.
 *
 * Strategy: PMP page wrappers set a bright text color on the dark theme,
 * while everything inside .pmpro_card forces a dark color for readability
 * on the white card background.
 *
 * Scope: only PMP pages. Enqueued from ThemeCompat::enqueueCheckoutCss
 * which gates on isPmpPage().
 */

/* === Outside cards: bright text on the dark theme background === */

.pmpro_levels-page,
.pmpro_checkout,
.pmpro_confirmation,
.pmpro_account,
.pmpro_billing,
.pmpro_cancel,
.pmpro_invoice {
    color: rgba(255, 255, 255, 0.92);
}

.pmpro_levels-page p,
.pmpro_checkout > p,
.pmpro_confirmation > p,
.pmpro_account > p,
.pmpro_billing > p,
.pmpro_cancel > p,
.pmpro_invoice > p,
.pmpro_thankyou-message,
.pmpro_message:not(.pmpro_error):not(.pmpro_success) {
    color: rgba(255, 255, 255, 0.92);
}

.pmpro_levels-page a,
.pmpro_checkout a,
.pmpro_confirmation a,
.pmpro_account a,
.pmpro_billing a,
.pmpro_invoice a {
    color: #00e5ff;
    text-decoration: underline;
}

/* === Inside cards: dark text on the white card background === */

.pmpro_card,
.pmpro_card * {
    color: #1f2937;
}

.pmpro_card h1,
.pmpro_card h2,
.pmpro_card h3,
.pmpro_card h4,
.pmpro_card legend,
.pmpro_form_legend {
    color: #0f172a;
    font-weight: 700;
}

.pmpro_card label,
.pmpro_form_label {
    color: #1f2937;
    font-weight: 600;
}

.pmpro_card .pmpro_form_field-description,
.pmpro_card .pmpro_form_field-content,
.pmpro_card p {
    color: #374151;
}

.pmpro_card a {
    color: #0369a1;
    text-decoration: underline;
}

.pmpro_card table,
.pmpro_card th,
.pmpro_card td {
    color: #1f2937;
}

/* === Form inputs inside cards === */

.pmpro_card input[type="text"],
.pmpro_card input[type="email"],
.pmpro_card input[type="password"],
.pmpro_card input[type="number"],
.pmpro_card input[type="tel"],
.pmpro_card select,
.pmpro_card textarea {
    color: #0f172a;
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.pmpro_card input::placeholder {
    color: #94a3b8;
}

/* === Submit and action buttons === */

.pmpro_btn,
.pmpro_btn-submit-checkout {
    background-color: #00e5ff;
    color: #0a0a0a;
    font-weight: 700;
    border: none;
}

.pmpro_btn:hover,
.pmpro_btn-submit-checkout:hover {
    background-color: #00b8cc;
    color: #0a0a0a;
}

/* === Alerts and messages === */

.pmpro_message {
    background-color: #fff7ed;
    border: 1px solid #fdba74;
    color: #1f2937;
}

.pmpro_message.pmpro_error {
    background-color: #fef2f2;
    border-color: #fca5a5;
    color: #7f1d1d;
}

.pmpro_message.pmpro_success {
    background-color: #ecfdf5;
    border-color: #6ee7b7;
    color: #064e3b;
}

/* === Order status badge readability === */

.pmpro_card .pmpro_order_status,
.pmpro_card .pmpro_order_status-paid {
    color: #064e3b;
    background-color: #d1fae5;
}
