.hide{
    display: none;
}
.valid{
    color: green;
}
.invalid{
    color: red;
}
ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
ul li{
    margin: 0;
    padding: 0;
}
.gateway-box{
    display: none;
}

/*  */
.restrictmate-subscribe-info {
    background: #e8f3fc;
    border: 1px solid #b8d8f3;
    border-left: 5px solid #0073aa;
    padding: 20px 25px;
    text-align: left;
    max-width: 600px;
    margin: 30px auto;
    font-size: 16px;
    line-height: 1.6;
    border-radius: 6px;
    color: #114b8a;
}

.restrictmate-subscribe-info p {
    margin-top: 0px;
}


/* Invoice Style */
.restrictmate-invoice-body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

.restrictmate-invoice-box {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.restrictmate-invoice-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.restrictmate-header-left h1 {
    margin: 0;
    font-size: 32px;
    color: #2c3e50;
}

.restrictmate-invoice-meta {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    line-height: 1.6;
}

.restrictmate-invoice-address {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 40px;
}

.restrictmate-invoice-address h3 {
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.restrictmate-invoice-address p {
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.restrictmate-invoice-body .pay-to,
.restrictmate-invoice-bill-to {
    width: 45%;
}

.restrictmate-invoice-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}
.restrictmate-invoice-body tr th:nth-child(1),
.restrictmate-invoice-body tr td:nth-child(1) {
    text-align: left;
}

.restrictmate-invoice-body tr:nth-last-child(-n+3) td:nth-child(1){
    width: 84%;
}

.restrictmate-invoice-body tr th:nth-child(2),
.restrictmate-invoice-body tr:nth-last-child(-n+3) td:nth-child(1),
.restrictmate-invoice-body tr td:nth-child(2){
    text-align: right;
}

.restrictmate-invoice-body th, .restrictmate-invoice-body td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.restrictmate-invoice-body th {
    background: #f0f0f0;
}

.restrictmate-invoice-body .total {
    font-size: 16px;
    font-weight: bold;
}

.restrictmate-invoice-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.restrictmate-invoice-summary div {
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.restrictmate-invoice-footer {
    text-align: center;
    font-size: 12px;
    color: #777;
}
.restrictmate-invoice-body .print-btn{
    float: right;
    font-size: 14px;
    color: #444;
}

@media print {
    .restrictmate-invoice-body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
    }
    .restrictmate-invoice-box {
        width: 600px;
        margin-left: auto !important;
        margin-right: auto !important;
        box-shadow: none;
        margin: 0;
        padding: 60px 0 0;
    }
    .restrictmate-invoice-body.print-btn {
        display: none;
    }
    .restrictmate-invoice-footer {
        padding: 60px 0 0;
    }
}

/* Register form style */

/* ========= RestrictMate Register Form ========= */
#restrictmate-register-form {
    --rm-font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --rm-blue: #0073aa;
    --rm-blue-ink: #114b8a;
    --rm-border: #d9d9d9;
    --rm-muted: #666;
    --rm-bg: #fff;
    --rm-bg-soft: #f7f9fb;

    font-family: var(--rm-font);
    max-width: 700px;
    margin: 30px auto;
    background: var(--rm-bg);
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 0 20px rgba(0,0,0,.06);
}

/* Small top note (Already have an account?) */
#restrictmate-register-form > p:first-child {
    margin: 0 0 16px 0;
    color: var(--rm-muted);
    font-size: 14px;
}
#restrictmate-register-form > p:first-child a {
    color: var(--rm-blue);
    text-decoration: none;
}
#restrictmate-register-form > p:first-child a:hover { text-decoration: underline; }

/* Labels + Inputs */
#restrictmate-register-form p {
    margin: 0 0 14px 0;
}
#restrictmate-register-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}
#restrictmate-register-form input[type="text"],
#restrictmate-register-form input[type="email"],
#restrictmate-register-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    outline: none;
    font-size: 15px;
}
#restrictmate-register-form input[readonly] {
    background: #f4f7fb;
    color: #444;
}
#restrictmate-register-form input:focus {
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}

/* Headings */
#restrictmate-register-form h2 {
    font-size: 18px;
    margin: 22px 0 12px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    color: #2c3e50;
}

/* Membership Levels (as neat cards) */
#restrictmate-register-form > ul {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
    gap: 12px;
    margin-bottom: 8px;
}

#restrictmate-register-form > ul li {
    margin: 0;
    padding: 0;
}

#restrictmate-register-form > ul li label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 14px;
    border: 1px solid var(--rm-border);
    border-radius: 10px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

#restrictmate-register-form > ul li label:hover {
    border-color: #c9d7e5;
    box-shadow: 0 4px 10px rgba(0,0,0,.04);
    background: #fcfdff;
}

#restrictmate-register-form input[type="radio"] {
    accent-color: var(--rm-blue);
    width: 18px;
    height: 18px;
}

/* Highlight selected membership (requires :has support, with JS fallback below) */
#restrictmate-register-form > ul li label:has(input[type="radio"]:checked) {
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}

/* Membership Details table = invoice style */
#restrictmate-register-form #calculate-new {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden; /* ensure radius on table containers */
    margin-bottom: 16px;
}
#restrictmate-register-form #calculate-new th,
#restrictmate-register-form #calculate-new td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #333;
}
#restrictmate-register-form #calculate-new th {
    background: #f0f4f8;
    text-align: left;
    font-weight: 600;
}
#restrictmate-register-form #calculate-new tr:last-child td {
    border-bottom: 0;
}
#restrictmate-register-form #calculate-new .total,
#restrictmate-register-form #calculate-new tfoot td {
    font-weight: 700;
}

/* Payment Gateways */
#restrictmate-register-form .payment-gateways-heading {
    margin-top: 20px;
}

#restrictmate-register-form .payment-gateways {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#restrictmate-register-form .payment-gateways .gateway {
    border: 1px solid var(--rm-border);
    border-radius: 10px;
    background: #fff;
    padding: 10px;
}

#restrictmate-register-form .payment-gateways .gateway > label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 0;
    padding: 6px 4px 10px 4px;
}
#restrictmate-register-form .membership_levels li label{
    display: block;
}
#restrictmate-register-form .membership_levels .level-extras {
    margin-left: 29px;
    border-left: 1px solid #e0e0e0;
    padding-left: 8px;
    font-size: 12px;
    font-weight: normal;
}
/* Expand the box for the checked gateway (CSS-first; JS fallback provided) */
#restrictmate-register-form .payment-gateways .gateway:has(input[type="radio"]:checked) {
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}
#restrictmate-register-form .payment-gateways .gateway:has(input[type="radio"]:checked) .gateway-box {
    display: block;
    border-top: 1px dashed #e3e7ec;
    margin-top: 8px;
    padding-top: 10px;
}

/* Gateway inner area helpers */
#restrictmate-register-form .gateway-box p:last-child { margin-bottom: 0; }

/* Submit Button */
#restrictmate-register-form #restrictmate_register {
    display: inline-block;
    margin-top: 8px;
    background: var(--rm-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .02s ease, box-shadow .2s ease, background .2s ease;
}
#restrictmate-register-form #restrictmate_register:hover {
    box-shadow: 0 6px 18px rgba(0,115,170,.25);
    background: #016694;
}
#restrictmate-register-form #restrictmate_register:active {
    transform: translateY(1px);
}

/* Helper states (kept from your existing palette) */
#restrictmate-register-form .valid { color: green; }
#restrictmate-register-form .invalid { color: red; }

/* Readability on small screens */
@media (max-width: 480px){
    #restrictmate-register-form { padding: 18px; }
    #restrictmate-register-form h2 { font-size: 17px; }
}


/* JS fallback class to mirror :has() highlight */
#restrictmate-register-form > ul li label.rm-selected {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}
#restrictmate-register-form .payment-gateways .gateway.is-active {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}

/* Account Page CSS */

/* ===== RestrictMate Account Tabs (matches the register form look) ===== */
.restrictmate-tabs-container {
    --rm-font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --rm-blue: #0073aa;
    --rm-border: #e5e7eb;
    --rm-muted: #666;
    --rm-soft: #f7f9fb;

    font-family: var(--rm-font);
    max-width: 900px !important;
    margin: 28px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,.06);
    display: flex;
    overflow: hidden;
    border: 1px solid #eef1f5;
}

/* Left menu */
.restrictmate-tabs-menu {
    min-width: 210px;
    background: var(--rm-soft);
    border-right: 1px solid var(--rm-border);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.restrictmate-tabs-menu .tab-link {
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid var(--rm-border);
    color: #1f2937;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.restrictmate-tabs-menu .tab-link:hover {
    border-color: #c9d7e5;
    box-shadow: 0 4px 10px rgba(0,0,0,.04);
    background: #fcfdff;
}
.restrictmate-tabs-menu .tab-link.active {
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
    font-weight: 700;
}
.restrictmate-tabs-menu .tab-link.link { /* logout looks like a texty button */
    background: transparent;
    border: 1px dashed #dbe3ea;
}

/* Right content */
.restrictmate-tabs-container .tabs-content {
    flex: 1;
    padding: 20px;
}
.restrictmate-tab-content { display: none; }
.restrictmate-tab-content.active { display: block; }

/* Headings + helper text */
.restrictmate-tab-content h2 { 
    font-size: 18px; 
    margin: 10px 0 12px;
    color: #2c3e50;
}
.restrictmate-tab-content p { color: #222; }

/* Profile form (same input/button style as register form) */
#restrictmate-profile-data p { margin: 0 0 14px; }
#restrictmate-profile-data label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2c3e50;
}
#restrictmate-profile-data input[type="text"],
#restrictmate-profile-data input[type="email"]{
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
    outline: none;
    font-size: 15px;
}
#restrictmate-profile-data input[readonly]{
    background: #f4f7fb;
    color: #444;
}
#restrictmate-profile-data input:focus{
    border-color: var(--rm-blue);
    box-shadow: 0 0 0 3px rgba(0,115,170,.12);
}
#restrictmate_profile_update{
    display: inline-block;
    margin-top: 6px;
    background: var(--rm-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow .2s, background .2s, transform .02s;
}
#restrictmate_profile_update:hover{ 
    box-shadow: 0 6px 18px rgba(0,115,170,.25);
    background: #016694;
}
#restrictmate_profile_update:active{ transform: translateY(1px); }
#restrictmate-profile-data span{ display:block; color: var(--rm-muted); font-size: 13px; margin-top:6px; }

/* Tables (Subscriptions & Transactions) — match invoice vibe */
.restrictmate-subscriptions-table,
.restrictmate-transactions-table{
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
    margin-top: 8px;
}
.restrictmate-subscriptions-table th,
.restrictmate-transactions-table th{
    background: #f0f4f8;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    padding: 12px 14px;
    border-bottom: 1px solid #e8edf3;
}
.restrictmate-subscriptions-table td,
.restrictmate-transactions-table td{
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    color: #333;
}
.restrictmate-subscriptions-table tr:last-child td,
.restrictmate-transactions-table tr:last-child td{ border-bottom: 0; }
.restrictmate-subscriptions-table tr:hover td,
.restrictmate-transactions-table tr:hover td{
    background: #fcfdff;
}

/* Table action links */
.restrictmate-subscriptions-table a,
.restrictmate-transactions-table a{
    color: var(--rm-blue);
    text-decoration: none;
    font-weight: 600;
}
.restrictmate-subscriptions-table a:hover,
.restrictmate-transactions-table a:hover{ text-decoration: underline; }

/* Small screens */
@media (max-width: 720px){
    .restrictmate-tabs-container{ 
        flex-direction: column; 
        border-radius: 12px;
    }
    .restrictmate-tabs-menu{
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid var(--rm-border);
        background: #fff;
        padding: 10px;
    }
    .restrictmate-tabs-menu .tab-link{ white-space: nowrap; }
    .restrictmate-tab-content{ padding: 6px 0; }
    .restrictmate-subscriptions-table,
    .restrictmate-transactions-table{
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
