/* =====================================================================
   PROMOSTORE LOGIN + CHECKOUT POLISH
   Safely scoped: these rules only run after promostore-auth-checkout.js
   adds body.ps-login-page or body.ps-checkout-page.
   View Cart (/view-cart) is deliberately excluded by the detector.
   ===================================================================== */

body.ps-login-page,
body.ps-checkout-page {
    --ps-blue: #171B6B;
    --ps-blue-deep: #0F1455;
    --ps-gold: #FECE05;
    --ps-ink: #061126;
    --ps-paper: #F5F2E9;
    --ps-white: #FFFFFF;
    --ps-muted: #667085;
    --ps-line: #D9DCE3;
    --ps-danger: #B42318;
    --ps-success: #067647;
}

/* Only the generated page body — never the Promostore header/footer. */
body.ps-login-page .ps-page-shell,
body.ps-checkout-page .ps-page-shell {
    background: var(--ps-paper);
    color: var(--ps-ink);
}

body.ps-login-page .ps-page-shell > .container,
body.ps-login-page .ps-page-shell > .container-fluid,
body.ps-checkout-page .ps-page-shell > .container,
body.ps-checkout-page .ps-page-shell > .container-fluid {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 48px 0 64px !important;
}

/* ---------- shared typography ---------- */
body.ps-login-page .ps-page-shell h1,
body.ps-login-page .ps-page-shell h2,
body.ps-login-page .ps-page-shell h3,
body.ps-login-page .ps-page-shell h4,
body.ps-checkout-page .ps-page-shell h1,
body.ps-checkout-page .ps-page-shell h2,
body.ps-checkout-page .ps-page-shell h3,
body.ps-checkout-page .ps-page-shell h4 {
    color: var(--ps-ink) !important;
    font-family: var(--ps-sans, "Inter Tight", Arial, sans-serif) !important;
    font-weight: 850 !important;
    letter-spacing: -.02em;
}

body.ps-login-page .ps-page-shell h1,
body.ps-login-page .ps-page-shell h2,
body.ps-checkout-page .ps-page-shell h1,
body.ps-checkout-page .ps-page-shell h2 {
    line-height: 1.05;
}

body.ps-login-page .ps-page-shell a,
body.ps-checkout-page .ps-page-shell a {
    color: var(--ps-blue);
}

body.ps-login-page .ps-page-shell a:hover,
body.ps-checkout-page .ps-page-shell a:hover {
    color: var(--ps-blue-deep);
}

/* ---------- form controls ---------- */
body.ps-login-page .ps-page-shell label,
body.ps-checkout-page .ps-page-shell label {
    color: var(--ps-ink);
    font-size: 13px;
    font-weight: 800;
}

body.ps-login-page .ps-page-shell .form-control,
body.ps-login-page .ps-page-shell .form-select,
body.ps-login-page .ps-page-shell input[type="text"],
body.ps-login-page .ps-page-shell input[type="email"],
body.ps-login-page .ps-page-shell input[type="password"],
body.ps-login-page .ps-page-shell input[type="tel"],
body.ps-login-page .ps-page-shell select,
body.ps-login-page .ps-page-shell textarea,
body.ps-checkout-page .ps-page-shell .form-control,
body.ps-checkout-page .ps-page-shell .form-select,
body.ps-checkout-page .ps-page-shell input[type="text"],
body.ps-checkout-page .ps-page-shell input[type="email"],
body.ps-checkout-page .ps-page-shell input[type="password"],
body.ps-checkout-page .ps-page-shell input[type="tel"],
body.ps-checkout-page .ps-page-shell input[type="number"],
body.ps-checkout-page .ps-page-shell select,
body.ps-checkout-page .ps-page-shell textarea {
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #BFC5D0 !important;
    border-radius: 0 !important;
    background: var(--ps-white) !important;
    box-shadow: none !important;
    color: var(--ps-ink) !important;
    font-size: 14px;
}

body.ps-login-page .ps-page-shell textarea,
body.ps-checkout-page .ps-page-shell textarea {
    min-height: 110px;
}

body.ps-login-page .ps-page-shell .form-control:focus,
body.ps-login-page .ps-page-shell .form-select:focus,
body.ps-login-page .ps-page-shell input:focus,
body.ps-login-page .ps-page-shell select:focus,
body.ps-login-page .ps-page-shell textarea:focus,
body.ps-checkout-page .ps-page-shell .form-control:focus,
body.ps-checkout-page .ps-page-shell .form-select:focus,
body.ps-checkout-page .ps-page-shell input:focus,
body.ps-checkout-page .ps-page-shell select:focus,
body.ps-checkout-page .ps-page-shell textarea:focus {
    border-color: var(--ps-blue) !important;
    box-shadow: 0 0 0 3px rgba(23, 27, 107, .12) !important;
    outline: 0 !important;
}

body.ps-login-page .ps-page-shell input[type="checkbox"],
body.ps-login-page .ps-page-shell input[type="radio"],
body.ps-checkout-page .ps-page-shell input[type="checkbox"],
body.ps-checkout-page .ps-page-shell input[type="radio"] {
    accent-color: var(--ps-blue);
}

/* Kill the old red checkbox outline without changing validation messages. */
body.ps-login-page .ps-page-shell .custom-control-label::before,
body.ps-checkout-page .ps-page-shell .custom-control-label::before {
    border-color: #BFC5D0 !important;
    background-color: var(--ps-white) !important;
}

/* ---------- generated cards / sections ---------- */
body.ps-login-page .ps-page-shell .card,
body.ps-login-page .ps-page-shell .panel,
body.ps-login-page .ps-page-shell .well,
body.ps-checkout-page .ps-page-shell .card,
body.ps-checkout-page .ps-page-shell .panel,
body.ps-checkout-page .ps-page-shell .well {
    border: 1px solid var(--ps-line) !important;
    border-radius: 0 !important;
    background: var(--ps-white) !important;
    box-shadow: 0 16px 42px rgba(6, 17, 38, .07);
}

body.ps-login-page .ps-page-shell .card-header,
body.ps-login-page .ps-page-shell .panel-heading,
body.ps-checkout-page .ps-page-shell .card-header,
body.ps-checkout-page .ps-page-shell .panel-heading {
    padding: 16px 20px;
    border-color: var(--ps-line) !important;
    border-radius: 0 !important;
    background: #F8F9FC !important;
    color: var(--ps-ink) !important;
    font-weight: 850;
}

body.ps-login-page .ps-page-shell .card-body,
body.ps-login-page .ps-page-shell .panel-body,
body.ps-checkout-page .ps-page-shell .card-body,
body.ps-checkout-page .ps-page-shell .panel-body {
    padding: 22px;
}

/* ---------- buttons ---------- */
body.ps-login-page .ps-page-shell .btn-primary,
body.ps-login-page .ps-page-shell input[type="submit"].btn-primary,
body.ps-login-page .ps-page-shell button[type="submit"].btn-primary,
body.ps-checkout-page .ps-page-shell .btn-primary,
body.ps-checkout-page .ps-page-shell input[type="submit"].btn-primary,
body.ps-checkout-page .ps-page-shell button[type="submit"].btn-primary {
    min-height: 48px;
    padding: 13px 24px !important;
    border: 2px solid var(--ps-blue) !important;
    border-radius: 0 !important;
    background: var(--ps-blue) !important;
    box-shadow: none !important;
    color: var(--ps-white) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.ps-login-page .ps-page-shell .btn-primary:hover,
body.ps-login-page .ps-page-shell .btn-primary:focus,
body.ps-checkout-page .ps-page-shell .btn-primary:hover,
body.ps-checkout-page .ps-page-shell .btn-primary:focus {
    border-color: var(--ps-gold) !important;
    background: var(--ps-gold) !important;
    color: var(--ps-ink) !important;
}

body.ps-login-page .ps-page-shell .btn-default,
body.ps-login-page .ps-page-shell .btn-secondary,
body.ps-checkout-page .ps-page-shell .btn-default,
body.ps-checkout-page .ps-page-shell .btn-secondary {
    min-height: 46px;
    padding: 12px 22px !important;
    border: 2px solid var(--ps-blue) !important;
    border-radius: 0 !important;
    background: var(--ps-white) !important;
    color: var(--ps-blue) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

body.ps-login-page .ps-page-shell .btn-default:hover,
body.ps-login-page .ps-page-shell .btn-secondary:hover,
body.ps-checkout-page .ps-page-shell .btn-default:hover,
body.ps-checkout-page .ps-page-shell .btn-secondary:hover {
    background: var(--ps-blue) !important;
    color: var(--ps-white) !important;
}

/* ---------- alerts / validation ---------- */
body.ps-login-page .ps-page-shell .alert,
body.ps-login-page .ps-page-shell .alertbox,
body.ps-checkout-page .ps-page-shell .alert,
body.ps-checkout-page .ps-page-shell .alertbox {
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.ps-login-page .ps-page-shell .alert-danger,
body.ps-login-page .ps-page-shell .alertbox-danger,
body.ps-checkout-page .ps-page-shell .alert-danger,
body.ps-checkout-page .ps-page-shell .alertbox-danger {
    border: 1px solid #FDA29B !important;
    border-left: 5px solid var(--ps-danger) !important;
    background: #FEF3F2 !important;
    color: #7A271A !important;
}

body.ps-login-page .ps-page-shell .alert-success,
body.ps-checkout-page .ps-page-shell .alert-success {
    border: 1px solid #ABEFC6 !important;
    border-left: 5px solid var(--ps-success) !important;
    background: #ECFDF3 !important;
    color: #05603A !important;
}

/* =====================================================================
   LOGIN
   ===================================================================== */
body.ps-login-page .ps-page-shell {
    min-height: 600px;
    padding: 46px 16px 70px;
}

/* Catch the PrintNow login container without requiring its private ID. */
body.ps-login-page .ps-page-shell .container:has(input[type="password"]),
body.ps-login-page .ps-page-shell .container-fluid:has(input[type="password"]),
body.ps-login-page .ps-page-shell .row:has(input[type="password"]) {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

body.ps-login-page .ps-page-shell .panel:has(input[type="password"]),
body.ps-login-page .ps-page-shell .card:has(input[type="password"]),
body.ps-login-page .ps-page-shell .well:has(input[type="password"]) {
    overflow: hidden;
    border-top: 6px solid var(--ps-gold) !important;
}

body.ps-login-page .ps-page-shell h1:first-of-type,
body.ps-login-page .ps-page-shell h2:first-of-type {
    color: var(--ps-blue) !important;
}

body.ps-login-page .ps-page-shell .form-group,
body.ps-login-page .ps-page-shell .mb-3 {
    margin-bottom: 18px !important;
}

body.ps-login-page .ps-page-shell input[type="submit"],
body.ps-login-page .ps-page-shell button[type="submit"] {
    cursor: pointer;
}

/* =====================================================================
   CHECKOUT
   ===================================================================== */
body.ps-checkout-page .ps-page-shell {
    min-height: 700px;
    padding: 42px 16px 72px;
}

body.ps-checkout-page .ps-page-shell table {
    width: 100%;
    color: var(--ps-ink);
}

body.ps-checkout-page .ps-page-shell table th,
body.ps-checkout-page .ps-page-shell table td {
    padding: 12px 10px;
    border-color: var(--ps-line) !important;
}

body.ps-checkout-page .ps-page-shell .text-primary,
body.ps-checkout-page .ps-page-shell h4.text-primary.m-0 {
    color: var(--ps-blue) !important;
}

body.ps-checkout-page .ps-page-shell .cart-totals,
body.ps-checkout-page .ps-page-shell [class*="order-summary"],
body.ps-checkout-page .ps-page-shell [class*="checkout-summary"] {
    border-color: var(--ps-line) !important;
    color: var(--ps-ink);
}

/* Emphasize likely final-order controls but only on checkout. */
body.ps-checkout-page .ps-page-shell input[value*="Place Order" i],
body.ps-checkout-page .ps-page-shell input[value*="Submit Order" i],
body.ps-checkout-page .ps-page-shell input[value*="Complete Order" i],
body.ps-checkout-page .ps-page-shell button[name*="place" i],
body.ps-checkout-page .ps-page-shell button[id*="place" i] {
    min-height: 52px;
    border: 2px solid var(--ps-gold) !important;
    border-radius: 0 !important;
    background: var(--ps-gold) !important;
    color: var(--ps-ink) !important;
    font-weight: 900 !important;
    text-transform: uppercase;
}

/* Keep legends/section titles clean and branded. */
body.ps-checkout-page .ps-page-shell legend {
    width: 100%;
    margin: 0 0 18px;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 3px solid var(--ps-gold);
    color: var(--ps-blue);
    font-size: 18px;
    font-weight: 900;
}

body.ps-checkout-page .ps-page-shell hr {
    border-color: var(--ps-line);
    opacity: 1;
}

/* ---------- responsive ---------- */
@media (max-width: 767.98px) {
    body.ps-login-page .ps-page-shell,
    body.ps-checkout-page .ps-page-shell {
        padding: 24px 10px 44px;
    }

    body.ps-login-page .ps-page-shell > .container,
    body.ps-login-page .ps-page-shell > .container-fluid,
    body.ps-checkout-page .ps-page-shell > .container,
    body.ps-checkout-page .ps-page-shell > .container-fluid {
        width: 100%;
        padding: 20px 0 36px !important;
    }

    body.ps-login-page .ps-page-shell .card-body,
    body.ps-login-page .ps-page-shell .panel-body,
    body.ps-checkout-page .ps-page-shell .card-body,
    body.ps-checkout-page .ps-page-shell .panel-body {
        padding: 18px;
    }

    body.ps-login-page .ps-page-shell .btn,
    body.ps-checkout-page .ps-page-shell .btn {
        max-width: 100%;
    }
}
