/* ============================================
   PMPro Custom Dark Branding
   Replaces Minimal Reset with Full Dark Theme
   ============================================ */

/* 1. Custom Page Template Layout */
.iv-pmpro-custom-wrapper {
    min-height: 80vh;
    background: #000;
}

/* 2. Branded Hero Section */
.iv-pmpro-hero {
    background: linear-gradient(135deg, #0f172a, #1e1b4b);
    padding: 100px 20px 60px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.iv-pmpro-hero h1 {
    font-family: 'Alice', serif;
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.2;
}

.iv-pmpro-hero p {
    font-family: 'Inter', sans-serif;
    color: #a0a0b0;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Gradient Text Effect */
.iv-gradient-text {
    background: linear-gradient(90deg, #3A86FF, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 3. Main Content Container */
.iv-pmpro-container {
    max-width: 1000px;
    margin: -40px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.iv-pmpro-content-box {
    background: #0a0a0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* 4. PMPro Elements Overrides (Dark Mode) */

/* General Text */
.pmpro_content_message,
.pmpro_message,
#pmpro_message,
.pmpro-body p,
.pmpro-body li,
.pmpro-body label {
    color: #e0e0e0 !important;
}

/* Headings */
.pmpro_checkout h2,
.pmpro_checkout h3,
.pmpro_levels h2 {
    color: #fff !important;
    font-family: 'Alice', serif !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
}

/* Inputs & Form Fields */
.pmpro_checkout input[type="text"],
.pmpro_checkout input[type="password"],
.pmpro_checkout input[type="email"],
.pmpro_checkout select,
.pmpro_checkout textarea,
.login input[type="text"],
.login input[type="password"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
}

.pmpro_checkout input:focus,
.pmpro_checkout select:focus,
.login input:focus {
    border-color: #3A86FF !important;
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.2) !important;
    outline: none !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Pricing / Levels Table (if used) */
table.pmpro_checkout td,
table.pmpro_checkout th {
    color: #e0e0e0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Buttons */
.pmpro_btn,
.pmpro_btn:link,
.pmpro_content_message a,
input[type="submit"].pmpro_btn {
    background: linear-gradient(135deg, #3A86FF, #6366f1) !important;
    border: none !important;
    color: #fff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.pmpro_btn:hover,
input[type="submit"].pmpro_btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(58, 134, 255, 0.4) !important;
    background: linear-gradient(135deg, #6366f1, #3A86FF) !important;
}

/* Cancel / Secondary Buttons */
.pmpro_btn.pmpro_btn-cancel {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #a0a0b0 !important;
}

.pmpro_btn.pmpro_btn-cancel:hover {
    border-color: #fff !important;
    color: #fff !important;
}

/* Levels Page - Cards Layout */
.pmpro_level {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
}

.pmpro_level:hover {
    border-color: #3A86FF !important;
    background: rgba(58, 134, 255, 0.05) !important;
}

.pmpro_level h2 {
    color: #fff !important;
    margin-top: 0 !important;
    border: none !important;
}

.pmpro_level-price {
    font-size: 1.5rem !important;
    color: #3A86FF !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .iv-pmpro-hero {
        padding: 60px 20px 40px;
    }

    .iv-pmpro-hero h1 {
        font-size: 2rem;
    }

    .iv-pmpro-content-box {
        padding: 20px 15px;
    }

    /* Force full width on inputs for mobile */
    .pmpro_checkout input[type="text"],
    .pmpro_checkout input[type="password"],
    .pmpro_checkout input[type="email"],
    .pmpro_checkout select,
    .pmpro_checkout textarea {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Responsive Tables */
    table.pmpro_checkout,
    table.pmpro_checkout tbody,
    table.pmpro_checkout tr,
    table.pmpro_checkout td,
    table.pmpro_checkout th {
        display: block !important;
        width: 100% !important;
    }

    table.pmpro_checkout tr {
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    table.pmpro_checkout td,
    table.pmpro_checkout th {
        padding: 10px 0 !important;
        border: none !important;
        text-align: left !important;
    }
}

/* ============================================
   PMPro Template Hardening (Fix Centering & BG)
   ============================================ */
/* Target the specific template body classes */
body.page-template-template-pmpro-levels,
body.page-template-template-pmpro-checkout,
body.page-template-template-pmpro-login,
body.page-template-template-pmpro-account {
    background-color: #000 !important;
    color: #fff !important;
}

/* Force Wrapper to be Full Width & Dark */
body.page-template-template-pmpro-levels .site-content,
body.page-template-template-pmpro-checkout .site-content,
body.page-template-template-pmpro-login .site-content,
body.page-template-template-pmpro-account .site-content {
    background-color: #000 !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* PMPro content container - Centered & Dark */
#pmpro_levels,
#pmpro_checkout,
#pmpro_account,
#pmpro_login,
.pmpro_content_message {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    background-color: #000000 !important;
    /* Ensure black bg */
    color: #ffffff !important;
    /* Ensure white text */
    padding: 30px !important;
    border-radius: 8px !important;
}

/* Force text colors in PMPro forms */
.pmpro_checkout label,
.pmpro_checkout .pmpro_checkout-fields,
.pmpro_account .pmpro_box,
.pmpro_login form {
    color: #ffffff !important;
}

.pmpro_checkout input[type="text"],
.pmpro_checkout input[type="email"],
.pmpro_checkout input[type="password"],
.pmpro_checkout select,
.pmpro_login input[type="text"],
.pmpro_login input[type="password"] {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    color: #ffffff !important;
    padding: 10px !important;
    border-radius: 4px !important;
}

/* Ensure Container is Centered on Desktop */
body.page-template-template-pmpro-levels .iv-pmpro-container,
body.page-template-template-pmpro-checkout .iv-pmpro-container,
body.page-template-template-pmpro-login .iv-pmpro-container,
body.page-template-template-pmpro-account .iv-pmpro-container {
    width: 100% !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* ============================================
   PMPRO MOBILE (Migrated from style.css)
   ============================================ */
@media screen and (max-width: 768px) {

    /* PMPro mobile */
    .pmpro_content,
    .pmpro_checkout,
    #pmpro_form,
    .pmpro-level-card {
        padding: 15px !important;
        margin: 10px !important;
        border-radius: 8px !important;
    }
}