/* =========================================
   1. Main Layout & Card Containers
   ========================================= */

.register-columns {
    justify-content: center;
}

/* GLOBAL LIST RESET: Removes stray bullet points */
ul.pms-form-fields-wrapper, .pms-account-navigation ul, .pms-form ul {
    padding: 0;
    margin-top: 0;
}

li.pms-field {
    list-style-type: none;
    margin-bottom: 1rem;
}

/* Swap order for Regilster and Subscribe */
#pms_register-form ul.pms-form-fields-wrapper, #pms_new_subscription-form ul.pms-form-fields-wrapper {
    display: grid;
    column-gap: 2rem;
}

.pms-account-section-wrapper {
    border-top: var(--border-medium);
}

/* Remove First and Last name, since they are optional */
.pms-last-name-field, .pms-first-name-field {
    display: none;
}

/* =========================================
   2. Typography & Links
   ========================================= */

/* Link Styling */
.pms-form a, table.pms-account-subscription-details-table a {
    color: var(--color-accent-text);
    font-weight: 600;
}

.pms-form a:hover, table.pms-account-subscription-details-table a:hover {
    text-decoration: underline;
}

/* Specific fix for "Abandon" link to look like a warning */
a.pms-account-subscription-action-link__abandon {
    color: var(--color-error) !important;
    margin-left: 10px;
}

/* =========================================
   3. Account Navigation (Tabs)
   ========================================= */

/* --- SUBSCRIPTIONS --- */
.account-info-panel {
    display: grid;
}
nav.pms-account-navigation {
    margin: 0 !important;
    order: -1;
}
.account-subscriptions-page .subscriptions-copy {
    margin: 0 !important;
}
/* Remove default text for Subscriptions */
.account-subscriptions-page .account-info-panel p:not(.subscriptions-text) {
    display: none;
}

.subscriptions-text {
    font-size: 1rem;
    margin-top: 0.5rem;
}
.account-info-panel h1 {
    font-size: var(--h3);
    margin-right: 0 !important;
    margin-left: 0 !important;
    color: var(--color-text-light);
    font-weight: 400;
}
nav.pms-account-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    justify-content: flex-start;
    margin-bottom: 1rem;
    border-bottom: solid 3px var(--color-bg-off-white);
}
.pms-account-navigation .pms-account-navigation-link {
    margin-top: 0;
}
.pms-account-navigation a {
    display: block;
    text-decoration: unset;
    padding: 0 1rem;
    color: var(--color-text-light) !important;
    font-weight: 600;
}
.pms-account-navigation-link:first-child a {
    padding-left: 0;
}
.pms-account-navigation-link:last-child a {
    padding-right: 0;
}
.pms-account-navigation a:is(.pms-account-navigation-link--active, .pms-account-navigation a[aria-current="page"]) {
    font-weight: 700;
    background-color: var(--color-bg-white);
    border-bottom: none;
    color: var(--color-accent-text) !important;
}
.pms-account-navigation a:after {
    content: "";
    display: block;
    width: 0%;
    height: 3px;
    background-color: var(--color-accent-text) !important;
    translate: 0 3px;
    border-radius: 20px;
}
.pms-account-navigation a:is(.pms-account-navigation-link--active, .pms-account-navigation a[aria-current="page"]):after {
    width: 100%;
}
.pms-account-navigation a:hover:after {
    width: 100%;
}

/* --- Subscription Table --- */
table.pms-account-subscription-details-table tr:nth-child(odd) {
    background-color: #dae2eb87;
}
table.pms-account-subscription-details-table tbody tr[class] td {
    padding: 0.25rem 0.5rem;
}
table.pms-account-subscription-details-table tr td:first-child:after {
    content: ":";
}
table.pms-account-subscription-details-table tr td:last-child {
    font-weight: 600;
}
.registration-content:has(.pms-account-subscription-details-table) {
    flex-basis: fit-content !important;
}


/* --- EDIT PROFILE --- */

form#pms_edit-profile-form {
    min-width: 300px;
}

/* =========================================
   4. Data Table (Subscription Details)
   ========================================= */
table#pms-payment-history {
    border-radius: var(--radius-small);
    overflow: hidden;
    outline: var(--border-medium);
    outline-offset: -1px;
}
#pms-payment-history thead {
    background-color: var(--color-brand-dark);
    color: var(--color-text-button);
}
table#pms-payment-history.pms-table :is(.pms-payment-id, .pms-payment-subscription-plan, .pms-payment-amount, .pms-payment-date, .pms-payment-datem, .pms-payment-status) {
    width: fit-content;
    font-size: 1rem;
    padding: 0.75rem 2rem;
    font-weight: 500;
}
#pms-payment-history tr {
    border-bottom: var(--border-medium);
}
table#pms-payment-history th:not(:last-child) {
    border-right: solid 1px;
}
table#pms-payment-history tr td:not(:last-child) {
    border-right: var(--border-medium);
}

.pms-account-subscription-details-table[class] {
    margin-bottom: 0;
}

/* =========================================
   5. Pricing Plans (Radio Cards)
   ========================================= */
.pms-field-subscriptions {
    order: -1;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
}

/* Without the registration form */
#pms_new_subscription-form .pms-field.pms-field-subscriptions {
    margin-top: 1rem;
}

#subscription-title {
    text-align: center;
}

:is(#pms_new_subscription-form, .pms-field-subscriptions) input[type="radio"] {
    position: absolute;
    left: -200vw;
    scale: 0;
}

:is(#pms_new_subscription-form, .pms-field-subscriptions) label {
    padding: 0.75rem 1rem;
    border: var(--border-dark);
    border-radius: var(--radius-medium);
    cursor: pointer;
    position: relative;
}

.pms-subscription-plan label:has(input:checked)::before, :is(#pms_register-form, #pms_new_subscription-form):has([value*="single_plan=yes"]) .pms-subscription-plan label:before {
    content: "✓";
    position: absolute;
    top: 0px;
    left: 50%;
    translate: -50% -50%;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    box-shadow: rgba(242, 111, 33, 0.3) 0px 2px 4px;
    background: var(--color-accent);
    border-radius: 5rem;
    border-width: 3px;
    border-style: solid;
    border-color: rgb(255, 255, 255);
    border-image: initial;
}

.pms-subscription-plan-name {
    color: var(--color-text-light);
    display: block;
    text-align: center;
    font-size: var(--h1);
    font-weight: 700;
}

.pms-subscription-plan-price {
    text-align: center;
    display: block;
}

.pms-subscription-plan .pms-divider {
    display: none;
}

.pms-subscription-plan .pms-divider.pms-duration-divider {
    display: inline;
}

.pms-subscription-plan-currency, .pms-subscription-plan-price-value {
    font-size: var(--h1);
    font-weight: 700;
}

.pms-subscription-plan-price {
    text-align: center;
    display: block;
    font-size: var(--h4);
}

.pms-subscription-plan label:has(input:checked), :is(#pms_register-form, #pms_new_subscription-form):has([value*="single_plan=yes"]) .pms-subscription-plan label {
    outline: 0.25rem solid var(--color-accent);
    outline-offset: -0.25rem;
    box-shadow: var(--shadow-medium);
}

#toc-n-privacy {
    font-size: 12px;
    color: #545454;
    text-align: center;
}

/* Subscription Percs Month and Year */
.sub-percs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    order: -1;
}
.year-percs, .month-percs {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sub-percs li.perc {
    display: flex;
}
.sub-percs li.perc:not(:first-child) {
    margin-top: 0.5rem;
}
li.perc.accent {
    color: var(--color-accent);
    font-weight: 700;
}
.sub-percs li.perc:before {
    content: "✓";
    color: var(--color-accent);
    font-weight: 900;
    margin-right: 0.5rem;
}
:is(#pms_register-form, #pms_new_subscription-form):has([value*="single_plan=yes"]) .sub-percs {
    display: none;
}

/* If a Subscription has been selected */

#pms_register-form:has([value*="single_plan=yes"]) .sub-percs {
    display: none;
}
:is(#pms_register-form, #pms_new_subscription-form):has([value*="single_plan=yes"]) .pms-field-subscriptions {
    grid-template-columns: unset;
    margin-bottom: 2rem;
}
:is(#pms_register-form, #pms_new_subscription-form):has([value*="single_plan=yes"]) .pms-subscription-plan label {
    width: fit-content;
    margin: auto;
    padding-right: 2rem;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

/* Payment Error, Success */
.pms-payment-error > p, .pms_success-messages-wrapper > p {
    margin: 0;
}

/* Beehive, which looks like a hneypot */
ul.pms-field-section:has(#beehive) {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}


/* =========================================
   6. Forms & Inputs
   ========================================= */
#pms_edit-profile-form ul.pms-form-fields-wrapper {
    list-style: none;
}

form.pms-form[id] label:not(:has(#id)) {
    font-weight: 600;
    margin-bottom: 0;
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.5;
    display: block;
}

.pms-subscription-plan-name {
    font-weight: 700;
    color: var(--color-text-light);
    font-size: var(--h2);
    display: block;
    text-align: center;
}

.pms-form input[type="text"], .pms-form input[type="password"], .pms-form input[type="email"] {
    border: var(--border-medium) !important;
    border-radius: var(--radius-small) !important;
    font-size: 1rem !important;
}

.pms-form input:focus {
    outline: none;
    border-color: var(--color-brand-dark);
    box-shadow: 0 0 0 3px rgba(0, 68, 97, 0.1);
}

.log-in-out-panel {
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* "Remember Me" Checkbox Alignment */
p.login-remember {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

p.login-remember input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    cursor: pointer;
}

p.login-remember label {
    margin: 0;
    cursor: pointer;
}

/* Register / Lost password */
p.login-extra {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

#register-title h2 {
    font-size: var(--h4);
    color: var(--color-text-light);
}

/* Submit Buttons */
#pms_edit-profile-form input[type="submit"]:not(#pms-delete-account), #pms_edit-profile-form input[type="submit"]:not(#pms-delete-account) {
    background-color: var(--color-brand-dark);
    color: var(--color-text-button) !important;
    border: none !important;
    padding: 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-medium);
    cursor: pointer;
    width: fit-content;
    display: block;
    max-width: unset;
    max-height: unset;
    height: 44px;
}
#pms_edit-profile-form input[type="submit"]:not(#pms-delete-account):hover {
    background-color: var(--color-brand-dark-hover);
}

#pms_login input#wp-submit {
    background-color: var(--color-brand-dark);
    color: var(--color-text-button) !important;
    border: none !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-medium);
    height: 44px;
}
#pms_login input#wp-submit:hover {
    background-color: var(--color-brand-dark-hover);
}

/* =========================================
   7. Notices & Alerts
   ========================================= */

p.pms-alert a {
    background-color: var(--color-brand-dark);
    color: var(--color-text-button) !important;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-medium);
    height: 44px;
    display: flex;
    width: fit-content;
    text-decoration: none;
    align-items: center;
    padding: 0 20px;
    margin: auto;
    margin-top: 1rem;
}
p.pms-alert a:hover {
    background-color: var(--color-brand-dark-hover);
}

/* =========================================
   My Styling
   ========================================= */

/* Style Checkmark List */
ul.checkmark {
    list-style: none;
}
ul.checkmark li:before {
    content: '✓';
    font-weight: 900;
    margin-left: -1.25rem;
    margin-right: 0.5rem;
    font-size: 1.25em;
    line-height: 0;
}

/* PayPal button */
#pms-paypal-connect {
    box-shadow: var(--shadow-medium);
    height: 40px;
    border-radius: var(--radius-medium);
    overflow: hidden;
}

#pms-paypal-connect:hover {
    box-shadow: none;
}

/* Hide Newsletter Subscription */
.footer-newsletter-sub, .footer-newsletter-sub-spacer {
    display: none;
}