/* T1021 welcome popup. Same tokens and dialog pattern as the research access gate; solid accent, no gradient text. */
#pp-welcome-popup {
    --pp-welcome-top: max(16px, env(safe-area-inset-top));
    --pp-welcome-bottom: max(16px, env(safe-area-inset-bottom));
    box-sizing: border-box; position: fixed; inset: 16px; z-index: 1001;
    top: var(--pp-welcome-top); bottom: var(--pp-welcome-bottom);
    width: min(440px, calc(100% - 32px)); height: max-content;
    max-width: none; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
    max-height: calc(100dvh - var(--pp-welcome-top) - var(--pp-welcome-bottom));
    margin: auto; padding: 0; border: 0; border-radius: 16px;
    overflow: auto; overscroll-behavior: contain; scrollbar-color: #B0853A #E8ECF4;
    background: #fff; color: #16233F; color-scheme: light;
    box-shadow: 0 24px 72px rgba(22, 35, 63, .3);
    font-family: Poppins, sans-serif; font-size: 15px; line-height: 1.6; text-align: left;
}
#pp-welcome-popup:not([open]) { display: none; }
#pp-welcome-popup[open] { display: block; animation: pp-welcome-in 220ms cubic-bezier(.16, 1, .3, 1) both; }
#pp-welcome-popup::backdrop {
    background: rgba(22, 35, 63, .68);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    animation: pp-welcome-fade 220ms ease-out both;
}
@keyframes pp-welcome-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@keyframes pp-welcome-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    #pp-welcome-popup[open], #pp-welcome-popup::backdrop { animation: none; }
}
#pp-welcome-popup *, #pp-welcome-popup *::before, #pp-welcome-popup *::after { box-sizing: border-box; }
#pp-welcome-popup ::selection { color: #16233F; background: #E8ECF4; }
#pp-welcome-popup .pp-welcome-card { position: relative; padding: 28px 32px 22px; }
#pp-welcome-popup .pp-welcome-brand { color: #16233F; font-family: 'Figtree', 'Figtree Fallback', sans-serif !important; font-size: 17px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; text-align: center; margin: 0 36px 22px; }
#pp-welcome-popup h2 { margin: 0 0 10px; color: #16233F !important; font-family: Poppins, sans-serif !important; font-size: clamp(24px, 4vw, 30px); font-weight: 700; line-height: 1.2; letter-spacing: -.025em; text-transform: none; text-wrap: balance; }
#pp-welcome-popup .pp-welcome-title-accent { color: #2356A8 !important; }
#pp-welcome-popup p { color: #344461; font-family: Poppins, sans-serif !important; margin: 0 0 18px; }
#pp-welcome-popup form { margin: 0; padding: 0; }
#pp-welcome-popup .pp-welcome-label { display: block; margin: 0 0 6px; color: #16233F !important; font-family: Poppins, sans-serif !important; font-size: 14px !important; font-weight: 600; line-height: 1.4; text-transform: none; letter-spacing: normal; }
#pp-welcome-popup #pp-welcome-email {
    display: block; width: 100%; min-height: 48px; margin: 0; padding: 11px 14px;
    border: 1px solid #9AA7BC; border-radius: 12px; background: #fff; color: #16233F;
    font-family: Poppins, sans-serif; font-size: 16px; line-height: 1.5; box-shadow: none;
}
#pp-welcome-popup #pp-welcome-email::placeholder { color: #536079; opacity: 1; }
#pp-welcome-popup #pp-welcome-email[aria-invalid="true"] { border-color: #B42318; border-width: 2px; padding: 10px 13px; }
#pp-welcome-popup .pp-welcome-error { margin: 8px 0 0; color: #B42318; font-size: 13px; line-height: 1.5; }
#pp-welcome-popup .pp-welcome-error::before { content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 0; border-radius: 50%; background: #B42318; }
#pp-welcome-popup .pp-welcome-error[hidden] { display: none; }
#pp-welcome-popup .pp-welcome-hp-wrap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
#pp-welcome-popup button {
    display: block; width: 100%; min-height: 48px; margin: 18px 0 0; padding: 12px 18px;
    border: 2px solid transparent !important; border-radius: 12px !important; background: #B0853A !important; color: #16233F !important;
    font: 600 15px/1.4 Poppins, sans-serif !important; cursor: pointer; text-transform: none !important; letter-spacing: normal !important;
    transition: none !important; box-shadow: none !important; touch-action: manipulation;
}
#pp-welcome-popup button:hover:not(:disabled) { background: #C39A51 !important; }
#pp-welcome-popup button:disabled { background: #E8ECF4 !important; color: #536079 !important; cursor: not-allowed; opacity: 1; }
#pp-welcome-popup .pp-welcome-submit { display: flex; align-items: center; justify-content: center; gap: 10px; }
#pp-welcome-popup .pp-welcome-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(22, 35, 63, .25); border-top-color: #16233F; border-radius: 50%; animation: pp-welcome-spin 800ms linear infinite; }
#pp-welcome-popup.pp-welcome-pending .pp-welcome-spinner { display: inline-block; }
@keyframes pp-welcome-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    #pp-welcome-popup .pp-welcome-spinner { animation: none; border-color: #16233F; border-top-color: transparent; }
}
#pp-welcome-popup .pp-welcome-disclosure { margin: 14px 0 0; font-size: 12px; line-height: 1.55; }
#pp-welcome-popup #pp-welcome-decline {
    width: auto; min-height: 44px; margin: 6px auto 0; padding: 10px 14px;
    background: transparent !important; color: #16233F !important; text-decoration: underline; text-underline-offset: 3px;
    font-weight: 500 !important;
}
#pp-welcome-popup #pp-welcome-decline:hover:not(:disabled) { background: #E8ECF4 !important; }
#pp-welcome-popup #pp-welcome-close {
    position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: #E8ECF4 !important; color: #16233F !important; border-radius: 50% !important;
}
#pp-welcome-popup #pp-welcome-close:hover:not(:disabled) { background: #E8ECF4 !important; }
#pp-welcome-popup #pp-welcome-close::before,
#pp-welcome-popup #pp-welcome-close::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 2px;
    background: #16233F; border-radius: 1px; pointer-events: none;
}
#pp-welcome-popup #pp-welcome-close::before { transform: translate(-50%, -50%) rotate(45deg); }
#pp-welcome-popup #pp-welcome-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
#pp-welcome-popup #pp-welcome-close svg { display: none; }
/* aria-live region: stays in the accessibility tree while empty (an empty <p> with zero margin has no height). */
#pp-welcome-popup .pp-welcome-status { margin: 0; color: #16233F; font-size: 15px; }
#pp-welcome-popup .pp-welcome-stack { margin: 14px 0 0; font-size: 12px; line-height: 1.55; }
#pp-welcome-popup .pp-welcome-form:not([hidden]) + .pp-welcome-status:not(:empty) { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #E8ECF4; font-size: 14px; }
#pp-welcome-popup .pp-welcome-form[hidden] { display: none; }
/* Later legacy theme rules use !important on generic buttons, labels and focus. */
#pp-welcome-popup :focus-visible { outline: 3px solid #16233F !important; outline-offset: 4px !important; box-shadow: none !important; }
#pp-welcome-popup .pp-welcome-footer { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #E8ECF4; color: #344461; font-size: 12px; text-align: center; }
@media (max-width: 480px) {
    #pp-welcome-popup .pp-welcome-card { padding: 16px; }
    #pp-welcome-popup .pp-welcome-brand { font-size: 15px; margin: 0 40px 16px; }
    #pp-welcome-popup .pp-welcome-footer { margin-top: 12px; padding-top: 10px; }
}
@media (max-height: 500px) {
    #pp-welcome-popup .pp-welcome-card { padding: 12px 20px; }
    #pp-welcome-popup .pp-welcome-brand { margin-bottom: 8px; }
    #pp-welcome-popup .pp-welcome-footer { margin-top: 8px; padding-top: 8px; }
}
@media (forced-colors: active) {
    #pp-welcome-popup { border: 2px solid CanvasText; }
    #pp-welcome-popup button { border-color: ButtonText !important; }
    #pp-welcome-popup #pp-welcome-close,
    #pp-welcome-popup #pp-welcome-close:hover:not(:disabled) { background: ButtonFace !important; }
    #pp-welcome-popup #pp-welcome-close::before,
    #pp-welcome-popup #pp-welcome-close::after { background: ButtonText !important; forced-color-adjust: none; }
    #pp-welcome-popup #pp-welcome-email { border-color: CanvasText; }
}

/* T1035: bottom-left leaves chat on the right; the script lifts this above either visible product cart bar. */
#pp-welcome-tab {
    box-sizing: border-box; position: fixed; z-index: 999;
    left: max(12px, env(safe-area-inset-left)); right: auto;
    bottom: max(12px, env(safe-area-inset-bottom), var(--pp-welcome-clearance, 0px));
    display: block; width: max-content; min-height: 44px;
    max-width: calc(100% - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right)) - 84px);
    margin: 0; padding: 11px 14px; border: 2px solid #B0853A !important; border-radius: 12px !important;
    background: #B0853A !important; color: #16233F !important;
    font: 600 13px/1.4 Poppins, sans-serif !important; text-align: center; text-transform: none !important; letter-spacing: normal !important;
    cursor: pointer; touch-action: manipulation; box-shadow: 0 4px 16px rgba(22, 35, 63, .2) !important;
    transform: none !important; transition: none !important; animation: none !important;
}
#pp-welcome-tab[hidden], body.logged-in #pp-welcome-tab { display: none !important; }
#pp-welcome-tab .pp-welcome-tab-stack { display: block; font-size: 11px; line-height: 1.4; font-weight: 500; }
#pp-welcome-tab:hover { background: #C39A51 !important; }
#pp-welcome-tab:focus-visible { outline: 3px solid #16233F !important; outline-offset: 4px !important; box-shadow: 0 0 0 2px #fff !important; }
@media (forced-colors: active) {
    #pp-welcome-tab { border-color: ButtonText !important; }
}
