/* 
 * TrueCertPrep Elite - Plugin Override System
 * Target: Quiz Maker Plugin (AYS)
 * Goal: Force plugin to match "MasterClass" Obsidian #0F0F0F / Gold #D4AF37 theme.
 * STRATEGY: High Specificity (Nuclear Option) to beat Plugin Defaults.
 */

/* 1. Reset Plugin Container */
html body div.ays-quiz-container,
html body div[id^="ays-quiz-container-"],
#ays-quiz-container-2 {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif !important;
}

/* 2. Question Title */
html body div.ays-quiz-container .ays_quiz_question,
html body div[id^="ays-quiz-container-"] .ays_quiz_question,
#ays-quiz-container-2 .ays_quiz_question,
#ays-quiz-container-2 .ays_quiz_question p {
    font-size: 1.5rem !important;
    /* Adjusted for better mobile fit */
    line-height: 1.5 !important;
    font-weight: 500 !important;
    color: #FAFAFA !important;
    /* Force White */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 2rem !important;
}

/* 3. Answers (The Buttons) */
html body div.ays-quiz-container .ays_quiz_answers,
html body div[id^="ays-quiz-container-"] .ays_quiz_answers,
#ays-quiz-container-2 .ays_quiz_answers {
    display: grid !important;
    gap: 1rem !important;
}

/* NUCLEAR OPTION: Force text color on EVERYTHING inside the quiz */
#ays-quiz-container-2,
#ays-quiz-container-2 * {
    color: #FFFFFF !important;
    text-shadow: none !important;
}

#ays-quiz-container-2 .ays-field,
#ays-quiz-container-2 label,
#ays-quiz-container-2 span,
#ays-quiz-container-2 p,
#ays-quiz-container-2 li {
    background-color: #0F0F0F !important;
    /* Obsidian BG */
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0.5rem !important;
    padding: 1.25rem !important;
    transition: all 0.2s ease-in-out !important;
    cursor: pointer !important;
    opacity: 1 !important;
    text-align: left !important;
}

/* HIDE BRANDING (Steve Jobs Request) - Aggressive */
.ays_quiz_author_message,
.ays-quiz-maker-branding,
a[href*="ays-pro.com"],
div[class*="ays-"]>a[href*="ays-pro.com"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    font-size: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* HIDE ORPHAN TEXT 'By' */
.ays-quiz-promote-powered-by-text,
.ays-quiz-promote-powered-by-text-row,
span[class*="powered-by"],
div[class*="powered-by"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* FIX BIG BOX & TEXT COLOR (Elon & Bezos) */
#ays-quiz-container-2 {
    min-height: auto !important;
    padding: 1.5rem !important;
}

#ays-quiz-container-2 * {
    color: #FFFFFF !important;
    /* Force white text everywhere including Title/Desc */
}

/* TIGHTEN TITLE */
#ays-quiz-container-2 .ays-quiz-title {
    margin-bottom: 1rem !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

/* FIX BIG BOX (Elop Musk Efficiency Request) */
#ays-quiz-container-2 {
    min-height: auto !important;
    padding: 2rem !important;
    /* Reduced from default */
}

/* TIGHTEN TITLE */
#ays-quiz-container-2 .ays-quiz-title {
    margin-bottom: 1.5rem !important;
}

/* Hover Effect */
html body div.ays-quiz-container .ays-field:hover,
html body div[id^="ays-quiz-container-"] .ays-field:hover {
    background-color: #1a1a1a !important;
    border-color: #D4AF37 !important;
    /* Gold Border */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* Selected State (Fixing the Purple) */
html body div.ays-quiz-container .ays-field.checked,
html body div[id^="ays-quiz-container-"] .ays-field.checked,
html body div.ays-quiz-container .ays-field.checked:hover {
    background-color: #1a1a1a !important;
    /* Keep Dark */
    border-color: #D4AF37 !important;
    color: #D4AF37 !important;
    /* Gold Text */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4) !important;
}

/* 4. Navigation Buttons (Next/Finish) */
html body input.ays_next.action-button,
html body input.ays_finish.action-button,
html body button.ays_next,
html body button.ays_finish {
    background-color: #D4AF37 !important;
    color: #000000 !important;
    /* Black Text */
    font-weight: 700 !important;
    padding: 1rem 3rem !important;
    border-radius: 9999px !important;
    border: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-top: 2rem !important;
    cursor: pointer !important;
    transition: transform 0.2s !important;
}

html body input.ays_next.action-button:hover,
html body input.ays_finish.action-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.6) !important;
}

/* =========================================
   5. PMPRO "REDESIGN" (The Glass Skin)
   Target: Login, Checkout, Invoice
========================================= */

/* Remove the "White Box" Card Look - ULTRA AGGRESSIVE */
#pmpro_login_wrap,
#pmpro_form,
.pmpro_box,
.pmpro_login_wrap,
#pmpro_login_wrap form,
div[id^="pmpro_"],
.pmpro_content_message {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 450px !important;
}

/* Typography Overrides */
#pmpro_login_wrap h2,
#pmpro_login_wrap label,
.pmpro_login_wrap label {
    color: #FAFAFA !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* Input Fields (Obsidian Style) */
#pmpro_login_wrap input[type="text"],
#pmpro_login_wrap input[type="password"],
#pmpro_login_wrap input[type="email"] {
    background-color: #1A1A1A !important;
    /* Charcoal */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #FFF !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
}

/* Focus State */
#pmpro_login_wrap input:focus {
    border-color: #D4AF37 !important;
    /* Gold */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
    outline: none !important;
}

/* The Button (Gold Pill) */
#pmpro_login_wrap input[type="submit"],
#pmpro_login_wrap button {
    background-color: #D4AF37 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    border-radius: 9999px !important;
    /* Pill */
    padding: 12px 30px !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer !important;
    letter-spacing: 0.05em !important;
    margin-top: 1rem !important;
}

#pmpro_login_wrap input[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4) !important;
}

/* Error Messages */
div.pmpro_message,
.pmpro_message_error {
    background-color: rgba(255, 0, 0, 0.1) !important;
    border: 1px solid #ff4444 !important;
    color: #ffcccc !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
}

/* =========================================
   6. MEMBERSHIP LEVELS PAGE (The Pricing Table)
========================================= */

/* NUCLEAR PMPRO OVERRIDE - PROVEN VIA INJECTION */
#pmpro_levels,
#pmpro_levels_table,
.pmpro_levels_table,
#pmpro_levels table,
#pmpro_levels tr,
#pmpro_levels td,
#pmpro_levels th,
.pmpro_level,
.pmpro_btn {
    background-color: #1A1A1A !important;
    background: #1A1A1A !important;
    color: #FFFFFF !important;
    border-color: #333 !important;
}

/* Annihilate any element forcing inline white backgrounds */
*[style*="background-color: white"],
*[style*="background-color: #ffffff"],
*[style*="background-color: #FFF"],
*[style*="background: white"],
*[style*="background: #ffffff"],
*[style*="background: #FFF"] {
    background-color: #1A1A1A !important;
    background: #1A1A1A !important;
}

/* Style the Select buttons in Gold */
.pmpro_btn-select,
.pmpro_btn {
    background-color: #D4AF37 !important;
    color: #1A1A1A !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 10px 25px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
}

/* Ensure outer theme containers don't bleed white */
.entry-content,
.ast-container,
.site-content,
.pmpro_membership_levels {
    background-color: transparent !important;
}

/* The "Select" Button */
a.pmpro_btn-select,
a.pmpro_btn,
input.pmpro_btn {
    background-color: #D4AF37 !important;
    color: #000 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 10px 25px !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s !important;
    border: none !important;
}

a.pmpro_btn-select:hover {
    background-color: #F1C40F !important;
    /* Brighter Gold */
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5) !important;
    transform: translateY(-2px) !important;
}

/* =========================================
   7. CHECKOUT PAGE (The Final Gate)
   Target: #pmpro_checkout_wrap
========================================= */

#pmpro_checkout_wrap {
    color: #FAFAFA !important;
    font-family: 'Inter', sans-serif !important;
}

/* Headings */
#pmpro_checkout_wrap h2,
#pmpro_checkout_wrap h3 {
    color: #D4AF37 !important;
    /* Gold */
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    font-weight: 700 !important;
}

/* Labels & Text */
#pmpro_checkout_wrap label,
#pmpro_checkout_wrap p,
#pmpro_checkout_wrap li,
#pmpro_checkout_wrap span {
    color: #FAFAFA !important;
}

/* Input Fields (Consistency) */
#pmpro_checkout_wrap input[type="text"],
#pmpro_checkout_wrap input[type="password"],
#pmpro_checkout_wrap input[type="email"],
#pmpro_checkout_wrap select,
#pmpro_checkout_wrap textarea {
    background-color: #1A1A1A !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #FFF !important;
    padding: 10px 15px !important;
    border-radius: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#pmpro_checkout_wrap input:focus,
#pmpro_checkout_wrap select:focus,
#pmpro_checkout_wrap textarea:focus {
    border-color: #D4AF37 !important;
    outline: none !important;
}

/* The Box itself (if any) */
#pmpro_level_cost {
    background-color: #1A1A1A !important;
    border: 1px solid #333 !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
}

/* Buttons */
#pmpro_btn-submit {
    background-color: #D4AF37 !important;
    color: #000 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    border-radius: 999px !important;
    padding: 15px 30px !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer !important;
    font-size: 1.1rem !important;
}

#pmpro_btn-submit:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5) !important;
    transform: scale(1.02) !important;
}

/* Specific Checkout Sections (User Fields, Payment Info, Pricing) */
.pmpro_checkout-fields,
#pmpro_user_fields,
#pmpro_payment_information_fields,
#pmpro_pricing_fields,
#pmpro_discount_code {
    background-color: #1A1A1A !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
}

/* Section Headings inside Checkout */
.pmpro_checkout-fields h3,
#pmpro_payment_information_fields h3,
#pmpro_user_fields h3,
#pmpro_pricing_fields h3 {
    margin-top: 0 !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
    /* Subtle Gold underline */
    margin-bottom: 1.5rem !important;
    color: #FAFAFA !important;
    font-size: 1.25rem !important;
}

/* Dividers */
hr,
.pmpro_checkout-divider {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 2rem 0 !important;
}

/* Discount Code Section */
#pmpro_discount_code .pmpro_checkout-field-discount_code {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

#pmpro_discount_code input[type="text"] {
    margin-bottom: 0 !important;
    /* override global margin to sit next to apply button */
    flex-grow: 1 !important;
}

#pmpro_discount_code input[type="button"] {
    background-color: transparent !important;
    border: 1px solid #D4AF37 !important;
    color: #D4AF37 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
}

#pmpro_discount_code input[type="button"]:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2) !important;
}

/* Checkbox alignment for Terms/Privacy */
.pmpro_checkout-field-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: 1.5rem !important;
}

.pmpro_checkout-field-checkbox input[type="checkbox"] {
    width: auto !important;
    accent-color: #D4AF37 !important;
    margin: 0 !important;
}

/* Message boxes inside Checkout */
.pmpro_message,
#pmpro_message {
    border-radius: 8px !important;
    padding: 1rem !important;
    margin-bottom: 2rem !important;
    background-color: rgba(212, 175, 55, 0.1) !important;
    /* Gold tint for info */
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #FAFAFA !important;
}

.pmpro_error,
.pmpro_message.pmpro_error {
    background-color: rgba(255, 0, 0, 0.1) !important;
    border: 1px solid #ff4444 !important;
    color: #ffcccc !important;
}

/* =========================================
   8. MEMBERSHIP ACCOUNT & ORDERS PAGES
   Target: .pmpro_card, .pmpro_section, #pmpro_account
========================================= */

/* Remove the "White Box" Card Look on Account Pages */
.pmpro_card,
.pmpro_card_content,
.pmpro_section,
.pmpro_section_content,
#pmpro_account,
#pmpro_account-profile,
#pmpro_account-memberships,
#pmpro_account-invoices,
#pmpro_account-links,
.pmpro_table {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Force dark row backgrounds on account tables (like invoices/orders) if they exist */
.pmpro_card table,
.pmpro_section table,
#pmpro_account table,
.pmpro_table {
    width: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #FAFAFA !important;
}

.pmpro_card tbody tr,
.pmpro_section tbody tr,
#pmpro_account tbody tr,
.pmpro_table tbody tr {
    background-color: #1A1A1A !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.pmpro_card th,
.pmpro_card td,
.pmpro_section th,
.pmpro_section td,
#pmpro_account th,
#pmpro_account td,
.pmpro_table th,
.pmpro_table td {
    background-color: #1A1A1A !important;
    color: #FAFAFA !important;
    border: none !important;
    padding: 1rem !important;
}

/* Forcing all headers to Gold */
.pmpro_card h2,
.pmpro_card h3,
.pmpro_section h2,
.pmpro_section h3,
#pmpro_account h2,
#pmpro_account h3,
.pmpro_account-heading {
    color: #D4AF37 !important;
}

/* Account Page Labels (e.g. Username:, Email:) */
.pmpro_card label,
.pmpro_card strong,
.pmpro_section label,
.pmpro_section strong,
#pmpro_account label,
#pmpro_account strong {
    color: #D4AF37 !important;
}

/* Account text/paragraphs */
.pmpro_card p,
.pmpro_section p,
#pmpro_account p,
.pmpro_card span,
.pmpro_section span,
#pmpro_account span {
    color: #FAFAFA !important;
}

/* Account Action Links (e.g. Edit Profile, Change Password, Log Out) */
.pmpro_card a,
.pmpro_section a,
#pmpro_account ul.pmpro_account-links li a,
.pmpro_actionlinks a {
    color: #D4AF37 !important;
    text-decoration: underline !important;
    background: transparent !important;
    /* Ensure no inline backgrounds */
}

.pmpro_card a:hover,
.pmpro_section a:hover,
#pmpro_account ul.pmpro_account-links li a:hover,
.pmpro_actionlinks a:hover {
    color: #F1C40F !important;
}

/* Hide any remaining white container wrapping the card */
*[class*="pmpro_"] {
    background-color: transparent;
    /* Try not to be !important on everything unless necessary */
}

.pmpro_card_content {
    background-color: #1A1A1A !important;
    border-radius: 8px !important;
    padding: 2rem !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 2rem !important;
}