/*
 * Train With Okey – Popup Text Fix (v1.0)
 *
 * This stylesheet applies a dark text color to the contents of modals and popups
 * across the site. It aims to improve readability of text that may otherwise
 * appear white or bright due to theme defaults or overlay effects. The
 * selectors target elements by common modal/popup class and ID patterns and
 * cascade to all descendant nodes. A high specificity and `!important` flag
 * ensure these colors override existing inline styles.
 */

/* Apply dark text to all elements within any modal or popup container. */
body .modal *,
body .modal-content *,
body .popup *,
body [class*="pop-up"] *,
body [class*="popup"] *,
body [class*="modal"] *,
body [id*="popup"] *,
body [id*="modal"] *,
body .pum-container *,
body .pum-content *,
body .pum-overlay * {
    color: #0b0f14 !important;
    -webkit-text-fill-color: #0b0f14 !important;
    text-shadow: none !important;
}

/* Preserve button colors within popups for contrast. */
body .modal button,
body .modal a.button,
body .popup button,
body [class*="popup"] a,
body [class*="modal"] button,
body [id*="popup"] button,
body [id*="modal"] button,
body .pum-content button,
body .pum-content a.button {
    color: #ffffff !important;
}

/* Ensure text inputs remain dark-on-light within popups. */
body .modal input[type="text"],
body .modal input[type="email"],
body .modal input[type="tel"],
body .modal textarea,
body .popup input[type="text"],
body .popup input[type="email"],
body .popup input[type="tel"],
body .popup textarea,
body [class*="popup"] input[type="text"],
body [class*="popup"] input[type="email"],
body [class*="popup"] input[type="tel"],
body [class*="popup"] textarea,
body [class*="modal"] input[type="text"],
body [class*="modal"] input[type="email"],
body [class*="modal"] input[type="tel"],
body [class*="modal"] textarea,
body [id*="popup"] input[type="text"],
body [id*="popup"] input[type="email"],
body [id*="popup"] input[type="tel"],
body [id*="popup"] textarea,
body [id*="modal"] input[type="text"],
body [id*="modal"] input[type="email"],
body [id*="modal"] input[type="tel"],
body [id*="modal"] textarea,
body .pum-content input,
body .pum-content textarea {
    background-color: #ffffff !important;
    color: #0b0f14 !important;
    border-color: #c8cdd2 !important;
}

/* Darken placeholder text for readability. */
body .modal ::placeholder,
body .popup ::placeholder,
body [class*="popup"] ::placeholder,
body [class*="modal"] ::placeholder,
body [id*="popup"] ::placeholder,
body [id*="modal"] ::placeholder,
body .pum-content ::placeholder {
    color: #4b5563 !important;
    opacity: 1 !important;
}