/*
 Theme Name:   Edumall Child (ATSQC)
 Template:     edumall
 Version:      1.0.0
Text Domain:   ats
*/

/* Keep normal branding unchanged; use the transparent localized asset only after the header becomes sticky. */
.branding-logo-wrap .ats-sticky-logo {
	display: none;
}

.headroom--not-top .branding-logo-wrap .ats-normal-logo {
	display: none !important;
}

.headroom--not-top .branding-logo-wrap .ats-sticky-logo {
	display: block;
}

/* ATS/WC Vendors dropdown: scoped, anchored to its control and responsive. */
.wcv-dashboard-wrapper .wcv-select-container,
.wcvendors-pro-dashboard-wrapper .wcv-select-container {
    position: relative;
    overflow: visible;
}

.wcv-dashboard-wrapper .wcv-select-list,
.wcvendors-pro-dashboard-wrapper .wcv-select-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: min(320px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

/* ATS subscription purchase controls: align the plan selector and Sign up button. */
.single-product form.cart .entry-product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 12px;
    width: 100%;
}

.single-product form.cart .entry-product-actions .wcsatt-options-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-column: 1;
    grid-row: 1 / span 2;
    align-items: start;
    gap: 12px;
    min-width: 0;
    margin: 0;
}

.single-product form.cart .entry-product-actions .wcsatt-options-product-prompt {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.single-product form.cart .entry-product-actions .wcsatt-options-product-wrapper {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
}

.single-product form.cart .entry-product-actions .wcsatt-options-product-wrapper,
.single-product form.cart .entry-product-actions .wcsatt-options-product-dropdown {
    width: 100%;
    max-width: 100%;
}

.single-product form.cart .entry-product-actions .single_add_to_cart_button {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    align-self: start;
    margin: 0;
}

@media (max-width: 767px) {
    .single-product form.cart .entry-product-actions {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 12px;
    }

    .single-product form.cart .entry-product-actions .wcsatt-options-product-prompt,
    .single-product form.cart .entry-product-actions .wcsatt-options-product-wrapper,
    .single-product form.cart .entry-product-actions .single_add_to_cart_button {
        grid-column: 1;
        grid-row: auto;
    }

    .single-product form.cart .entry-product-actions .wcsatt-options-wrapper {
        grid-column: 1;
        grid-row: auto;
    }

    .single-product form.cart .entry-product-actions .single_add_to_cart_button {
        min-height: 52px;
        margin-top: 0;
    }
}

.single-product .ats-annual-saving-callout {
    margin: 14px 0 18px;
    padding: 12px 14px;
    border-left: 3px solid #c8a56a;
    border-radius: 4px;
    background: #f7f1e5;
    color: #071b46;
    font-size: 14px;
    line-height: 1.55;
}

.single-product .ats-annual-saving-callout strong {
    color: #071b46;
}

/* Member portal hero: keep the welcome heading readable on the dark background. */
.ats-member-portal .ats-member-portal__welcome h1#ats-member-portal-title {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
}

/* Tutor dashboard branding: restore the intended scale of the sidebar logo
 * and the account avatar in the dashboard header. */
.tutor-dashboard-layout .tutor-dashboard-sidebar-logo {
    justify-content: center;
    height: 140px;
    padding: 10px 24px;
    background-size: auto 120px !important;
}

.tutor-dashboard-layout .tutor-dashboard-sidebar-logo img {
    width: 300px !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 120px !important;
    object-fit: contain;
    object-position: center;
}

/* Match the French asset's visible pixels to the unchanged English logo. */
.ats-tutor-logo-fr .tutor-dashboard-layout .tutor-dashboard-sidebar-logo img {
    transform: translateY(6px) scale(1.057);
    transform-origin: center;
}

.tutor-dashboard-layout .tutor-dashboard-header-user-avatar {
    padding: 0;
}

.tutor-dashboard-layout .tutor-dashboard-header-user-avatar .tutor-avatar.tutor-avatar-32 {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
}

@media (max-width: 768px) {
    .tutor-dashboard-layout .tutor-dashboard-header-user-avatar .tutor-avatar.tutor-avatar-32 {
        width: 44px !important;
        min-width: 44px !important;
        height: 44px !important;
    }
}

/* Student registration content sits directly inside a Bootstrap row.
 * The row's negative gutters cancel the parent container's padding, so keep
 * headings and login notices clear of the viewport edge on this page only.
 */
body.page-id-5 #page-content > .container > .row > #page-main-content > article {
    padding-inline: clamp(20px, 3.94vw, 50px);
}

/* Marketplace sidebar filters: keep the translated controls compact and
 * consistent with Edumall's existing sidebar widgets. */
.ats-marketplace-sidebar-filter .archive-sidebar-filter-heading {
    margin-bottom: 24px;
}

.ats-marketplace-filter-group {
    margin: 0 0 26px;
}

.ats-marketplace-filter-group h4 {
    margin: 0 0 12px;
    color: #071b46;
    font-size: 15px;
    font-weight: 600;
}

.ats-marketplace-filter-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ats-marketplace-filter-list li {
    margin: 0 0 8px;
}

.ats-marketplace-filter-list a {
    color: #52607a;
    font-size: 14px;
    text-decoration: none;
}

.ats-marketplace-filter-list li.is-active a,
.ats-marketplace-filter-list a:hover {
    color: #071b46;
    font-weight: 600;
}

.ats-marketplace-filter-price-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ats-marketplace-filter-price-fields label {
    display: block;
    color: #52607a;
    font-size: 12px;
}

.ats-marketplace-filter-price-fields input {
    width: 100%;
    margin-top: 5px;
    padding: 8px 9px;
    border: 1px solid #d9dee8;
    border-radius: 3px;
    color: #071b46;
    font-size: 13px;
}

.ats-marketplace-filter-price .button {
    min-height: 38px;
    padding: 8px 18px;
    border: 0;
    background: #edb34d;
    color: #071b46;
    font-size: 13px;
    font-weight: 600;
}

.ats-marketplace-filter-reset {
    display: inline-block;
    margin-top: 2px;
    color: #071b46;
    font-size: 13px;
    text-decoration: underline;
}

/* Events archive: keep Isotope from scattering cards with absolute offsets.
 * Edumall's event template positions these items with inline left/top values;
 * the CSS grid below owns the layout instead, while preserving the theme's
 * four / two / one-column responsive behavior. */
body.post-type-archive-tp_event .edumall-event-grid-wrapper .edumall-grid,
body.post-type-archive-tp_event .edumall-grid-wrapper .edumall-grid,
body.tax-tp_event_category .edumall-grid-wrapper .edumall-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    height: auto !important;
}

body.post-type-archive-tp_event .edumall-grid-wrapper .edumall-grid > .grid-sizer,
body.tax-tp_event_category .edumall-grid-wrapper .edumall-grid > .grid-sizer {
    display: none !important;
}

body.post-type-archive-tp_event .edumall-grid-wrapper .edumall-grid > .grid-item,
body.tax-tp_event_category .edumall-grid-wrapper .edumall-grid > .grid-item {
    position: static !important;
    width: auto !important;
    min-width: 0;
    height: auto !important;
    transform: none !important;
    box-sizing: border-box;
}

@media (max-width: 1199px) {
    body.post-type-archive-tp_event .edumall-grid-wrapper .edumall-grid,
    body.tax-tp_event_category .edumall-grid-wrapper .edumall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.post-type-archive-tp_event .edumall-grid-wrapper .edumall-grid,
    body.tax-tp_event_category .edumall-grid-wrapper .edumall-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }
}


/* ATS My Account: focused login/register refinement. */
body.woocommerce-account:not(.logged-in) {
    --ats-account-navy: #071b46;
    --ats-account-navy-soft: #29456f;
    --ats-account-gold: #c8a56a;
    --ats-account-ink: #162746;
    --ats-account-muted: #60708c;
    --ats-account-border: #dce3ee;
    background: #f4f7fb;
}

body.woocommerce-account:not(.logged-in) #page-content {
    background:
        radial-gradient(circle at 8% 0%, rgba(200, 165, 106, .14), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0%, #f1f5fa 100%);
    padding: clamp(52px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
}

body.woocommerce-account:not(.logged-in) #page-content > .container {
    max-width: 1240px;
    padding-right: 24px;
    padding-left: 24px;
}

body.woocommerce-account:not(.logged-in) #page-main-content {
    width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    padding: 0;
}

body.woocommerce-account:not(.logged-in) #page-main-content > article {
    margin: 0;
    padding: 0;
}

body.woocommerce-account:not(.logged-in) #customer_login {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 34px);
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    clear: both;
}

body.woocommerce-account:not(.logged-in) #customer_login::before,
body.woocommerce-account:not(.logged-in) #customer_login::after {
    display: none !important;
    content: none !important;
}

body.woocommerce-account:not(.logged-in) #customer_login > .col-1,
body.woocommerce-account:not(.logged-in) #customer_login > .col-2 {
    display: flex;
    flex-direction: column;
    float: none !important;
    width: auto !important;
    min-width: 0;
    min-height: 100%;
    margin: 0 !important;
    padding: clamp(28px, 4vw, 48px);
    background: #fff;
    border: 1px solid var(--ats-account-border);
    border-top: 4px solid var(--ats-account-gold);
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(7, 27, 70, .08);
}

body.woocommerce-account:not(.logged-in) #customer_login > .col-2 {
    border-top-color: var(--ats-account-navy);
}

body.woocommerce-account:not(.logged-in) #customer_login h2 {
    position: relative;
    margin: 0 0 34px;
    padding-bottom: 17px;
    color: var(--ats-account-navy);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}

body.woocommerce-account:not(.logged-in) #customer_login h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 3px;
    border-radius: 999px;
    background: var(--ats-account-gold);
    content: "";
}

body.woocommerce-account:not(.logged-in) #customer_login > .col-2 h2::after {
    background: var(--ats-account-navy);
}

body.woocommerce-account:not(.logged-in) #customer_login form {
    margin: 0;
}

body.woocommerce-account:not(.logged-in) #customer_login .form-row {
    margin-bottom: 22px;
}

body.woocommerce-account:not(.logged-in) #customer_login .form-row > label:not(.woocommerce-form__label-for-checkbox),
body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register > p > label:not(.apply_for_vendor_label):not(.agree_to_terms_label) {
    display: block;
    margin: 0 0 8px;
    color: var(--ats-account-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.4;
    text-transform: uppercase;
}

body.woocommerce-account:not(.logged-in) #customer_login input.input-text {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid var(--ats-account-border);
    border-radius: 10px;
    background: #fbfcfe;
    color: var(--ats-account-ink);
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

body.woocommerce-account:not(.logged-in) #customer_login input.input-text:hover {
    border-color: #b8c6da;
    background: #fff;
}

body.woocommerce-account:not(.logged-in) #customer_login input.input-text:focus {
    border-color: var(--ats-account-gold);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(200, 165, 106, .16);
}

body.woocommerce-account:not(.logged-in) #customer_login .password-input {
    width: 100%;
}

body.woocommerce-account:not(.logged-in) #customer_login .password-input input.input-text {
    padding-right: 52px;
}

body.woocommerce-account:not(.logged-in) #customer_login .password-input .show-password-input {
    right: 5px;
    bottom: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 !important;
    color: var(--ats-account-navy);
}

body.woocommerce-account:not(.logged-in) #customer_login .password-input .show-password-input:focus-visible {
    border-radius: 8px;
    outline: 3px solid rgba(200, 165, 106, .45);
    outline-offset: 1px;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form__label-for-checkbox,
body.woocommerce-account:not(.logged-in) #customer_login .apply_for_vendor_label,
body.woocommerce-account:not(.logged-in) #customer_login .agree_to_terms_label {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--ats-account-muted);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    text-transform: none;
}

body.woocommerce-account:not(.logged-in) #customer_login input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--ats-account-navy);
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login p.form-row:has(.woocommerce-form-login__submit) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 10px 0 0;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login__rememberme {
    margin: 0;
}

body.woocommerce-account:not(.logged-in) #customer_login button.button {
    min-height: 54px;
    border: 0;
    border-radius: 10px;
    background: var(--ats-account-navy);
    box-shadow: 0 10px 20px rgba(7, 27, 70, .14);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.woocommerce-account:not(.logged-in) #customer_login button.button:hover,
body.woocommerce-account:not(.logged-in) #customer_login button.button:focus-visible {
    background: var(--ats-account-navy-soft);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(7, 27, 70, .18);
}

body.woocommerce-account:not(.logged-in) #customer_login button.button:focus-visible {
    outline: 3px solid rgba(200, 165, 106, .6);
    outline-offset: 3px;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login__submit {
    min-width: 150px;
    margin: 0;
    padding: 0 24px;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register__submit {
    width: 100%;
    margin-top: 8px;
    padding: 0 24px;
}

body.woocommerce-account:not(.logged-in) #customer_login .lost_password {
    margin: 22px 0 0;
}

body.woocommerce-account:not(.logged-in) #customer_login .lost_password a {
    color: var(--ats-account-navy);
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(200, 165, 106, .75);
    text-underline-offset: 4px;
}

body.woocommerce-account:not(.logged-in) #customer_login .lost_password a:hover {
    color: #173f7a;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register > p:not(.form-row) {
    color: var(--ats-account-muted);
    font-size: 14px;
    line-height: 1.65;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register .apply_for_vendor_label,
body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register .agree_to_terms_label {
    width: 100%;
    margin: 0;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-register .agree-to-terms-container {
    margin-top: 2px;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text {
    margin: 24px 0 0;
    color: var(--ats-account-muted);
    font-size: 12px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text p {
    margin: 0;
}

body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-privacy-policy-text a {
    color: var(--ats-account-navy);
    font-weight: 700;
}

body.woocommerce-account:not(.logged-in) #customer_login .clear {
    display: none;
}

@media (max-width: 767px) {
    body.woocommerce-account:not(.logged-in) #page-content {
        padding: 36px 0 56px;
    }

    body.woocommerce-account:not(.logged-in) #page-content > .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    body.woocommerce-account:not(.logged-in) #customer_login {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    body.woocommerce-account:not(.logged-in) #customer_login > .col-1,
    body.woocommerce-account:not(.logged-in) #customer_login > .col-2 {
        padding: 28px 22px;
        border-radius: 14px;
    }

    body.woocommerce-account:not(.logged-in) #customer_login h2 {
        margin-bottom: 28px;
        font-size: 28px;
    }

    body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login p.form-row:has(.woocommerce-form-login__submit) {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login__rememberme,
    body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login__submit {
        width: 100%;
    }

    body.woocommerce-account:not(.logged-in) #customer_login .woocommerce-form-login__submit {
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-account:not(.logged-in) #customer_login input.input-text,
    body.woocommerce-account:not(.logged-in) #customer_login button.button {
        transition-duration: .01ms;
    }
}
