/*
 * LXP Certificate widget.
 *
 * Source of truth: docs/Curriki-Grant-Application-Course-Certificate.html.
 * Every value inside the "design" block below is copied from that file
 * unchanged — only the selectors are scoped under .lxp-cert-wrap .cert so the
 * design neither leaks into nor gets overridden by the Elementor page around
 * it. If the design file changes, re-copy it here; do not hand-tune values.
 *
 * The font family is renamed ('LXP Cert Montserrat') so these @font-face rules
 * cannot collide with a theme that loads its own Montserrat.
 */

@font-face{font-family:'LXP Cert Montserrat';font-weight:400;font-style:normal;src:url(../fonts/montserrat-400.woff) format('woff')}
@font-face{font-family:'LXP Cert Montserrat';font-weight:500;font-style:normal;src:url(../fonts/montserrat-500.woff) format('woff')}
@font-face{font-family:'LXP Cert Montserrat';font-weight:600;font-style:normal;src:url(../fonts/montserrat-600.woff) format('woff')}
@font-face{font-family:'LXP Cert Montserrat';font-weight:700;font-style:normal;src:url(../fonts/montserrat-700.woff) format('woff')}

/* ── Wrapper (stands in for the design's :root / body) ─────────────────── */
.lxp-cert-wrap{--b1:#084892;--b1-25:#063A75;--b2:#285AA5;--b5:#E5EEFF;--hl:#F7FAFF;--y1:#F8AF2C;--y3:#FFCA70;--y4:#FFE8C1;--y2-25:#9F6F00;--w1:#515151;--w2:#767676;--w4:#E5E5E5;font-family:'LXP Cert Montserrat','Helvetica Neue',Arial,sans-serif;background:var(--hl);color:var(--w1);padding:24px;border-radius:12px}
.lxp-cert-wrap *{box-sizing:border-box}

/* Theme-proofing: give every element inside the card the design's own
   inherited defaults back, so theme rules on h1/h2/p/input/label/i can't
   bleed in. These match what the design file gets from a bare <body>. */
.lxp-cert-wrap .cert{line-height:normal;text-transform:none}
.lxp-cert-wrap .cert *{font-family:inherit;line-height:inherit;text-transform:inherit;text-shadow:none}
.lxp-cert-wrap .cert h1,.lxp-cert-wrap .cert h2,.lxp-cert-wrap .cert p,.lxp-cert-wrap .cert label,.lxp-cert-wrap .cert span{padding:0;letter-spacing:normal;text-align:left;background:none;border:0}
.lxp-cert-wrap .cert .field input{margin:0;min-height:0;max-width:none;letter-spacing:normal;text-align:left;box-shadow:none;-webkit-appearance:none;appearance:none}

/* ── Design ─────────────────────────────────────────────────────────────── */
.lxp-cert-wrap .cert{position:relative;width:1056px;height:816px;background:#fff;border-radius:25px;box-shadow:0 12px 32px rgba(8,72,146,.14);overflow:hidden;-webkit-print-color-adjust:exact;print-color-adjust:exact;font-family:'LXP Cert Montserrat','Helvetica Neue',Arial,sans-serif;color:var(--w1)}
/* left band */
.lxp-cert-wrap .cert .band{position:absolute;left:0;top:0;bottom:0;width:256px;background:linear-gradient(165deg,var(--b1) 0%,var(--b1-25) 100%);overflow:hidden;color:#fff}
.lxp-cert-wrap .cert .band i{position:absolute;border-radius:50%;display:block}
.lxp-cert-wrap .cert .logo{position:absolute;left:34px;top:56px;width:188px;height:auto;overflow:visible;max-width:none}
.lxp-cert-wrap .cert .seal{position:absolute;left:50%;top:318px;width:150px;height:150px;margin-left:-75px}
.lxp-cert-wrap .cert .seal svg{display:block;width:150px;height:150px} /* .seal is a wrapper div here — html2canvas drops an absolutely-positioned inline <svg> */
.lxp-cert-wrap .cert .band .t{position:absolute;left:0;right:0;text-align:center}
.lxp-cert-wrap .cert .band .t1{top:492px;font-size:13px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--y3)}
.lxp-cert-wrap .cert .band .t2{top:522px;font-size:15px;font-weight:500;line-height:1.5;padding:0 36px;color:#fff;opacity:.92}
.lxp-cert-wrap .cert .band .url{bottom:44px;font-size:13px;font-weight:600;letter-spacing:.04em}
/* right */
.lxp-cert-wrap .cert .main{position:absolute;left:256px;right:0;top:0;bottom:0;background:radial-gradient(520px 360px at 100% 0%,var(--hl),#fff 70%)}
.lxp-cert-wrap .cert .pill{position:absolute;left:64px;top:62px;background:var(--b5);color:var(--b1);font-weight:600;font-size:11.5px;letter-spacing:.14em;text-transform:uppercase;padding:9px 20px;border-radius:999px}
.lxp-cert-wrap .cert h1{position:absolute;left:64px;right:56px;top:112px;margin:0;white-space:nowrap;font-size:45px;line-height:1.12;font-weight:700;color:var(--b1);letter-spacing:-.005em}
.lxp-cert-wrap .cert h1 em{font-style:normal;color:var(--y2-25)}
.lxp-cert-wrap .cert .lead{position:absolute;left:64px;margin:0;font-size:16px;font-weight:400;color:var(--w1);letter-spacing:.02em}
.lxp-cert-wrap .cert .l1{top:200px} .lxp-cert-wrap .cert .l2{top:384px}
.lxp-cert-wrap .cert .field{position:absolute;display:block;margin:0}
.lxp-cert-wrap .cert .field input,
.lxp-cert-wrap .cert .field .lxp-cert-value{width:100%;display:block;border:0;border-bottom:2px solid var(--b2);border-radius:0;background:transparent;font-family:inherit;color:var(--b1-25);padding:4px 2px;outline:0}
.lxp-cert-wrap .cert .field input:focus{background:var(--hl);box-shadow:0 0 0 3px rgba(40,90,165,.25)}
.lxp-cert-wrap .cert .field span{display:block;margin-top:9px;font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--w2)}
.lxp-cert-wrap .cert .name{left:64px;right:56px;top:234px}
.lxp-cert-wrap .cert .name input,
.lxp-cert-wrap .cert .name .lxp-cert-value{font-size:38px;font-weight:700;color:var(--b1);height:68px;padding-left:0}
.lxp-cert-wrap .cert .card{position:absolute;left:64px;right:56px;top:424px;height:132px;background:#fff;border:1px solid var(--w4);border-radius:18px;box-shadow:0 8px 24px rgba(8,72,146,.10);display:flex;align-items:center;gap:24px;padding:0 32px}
.lxp-cert-wrap .cert .card:before{content:"";position:absolute;left:0;top:22px;bottom:22px;width:5px;border-radius:0 4px 4px 0;background:var(--y1)}
.lxp-cert-wrap .cert .ico{flex:none;width:68px;height:68px;border-radius:16px;background:var(--b5);display:flex;align-items:center;justify-content:center}
.lxp-cert-wrap .cert .card h2{margin:0;font-size:30px;line-height:1.15;font-weight:700;color:var(--b2)}
.lxp-cert-wrap .cert .card p{margin:6px 0 0;font-size:14px;color:var(--w1)}
/* Not in the design (its sample title is short): keep long course titles
   inside the fixed-height card. lxp-certificate.js steps the h2 font-size
   down from the design's 30px until the text fits; these stop a single long
   word from pushing past the card's right edge. */
.lxp-cert-wrap .cert .card .card-text{min-width:0;overflow-wrap:anywhere}
.lxp-cert-wrap .cert .row{top:640px}
.lxp-cert-wrap .cert .row input,
.lxp-cert-wrap .cert .row .lxp-cert-value{font-size:14px;font-weight:500;height:36px}
.lxp-cert-wrap .cert .email{left:64px;width:272px} .lxp-cert-wrap .cert .school{left:352px;width:240px} .lxp-cert-wrap .cert .date{left:608px;width:136px}

/* ── Capture mode — the design's @media print block, applied to the
   off-screen clone that html2canvas photographs. Inputs are swapped for
   .lxp-cert-value divs there (html2canvas draws input values unreliably);
   the div must sit exactly where the input's text did. ─────────────────── */
.lxp-cert-wrap .cert .field .lxp-cert-value{display:flex;align-items:center;white-space:nowrap;overflow:hidden}
.lxp-cert-wrap .cert.lxp-cert--capture{box-shadow:none;border-radius:0}
.lxp-cert-wrap.lxp-cert-capture-host{position:absolute;left:-20000px;top:0;width:1056px;height:816px;padding:0;background:none;border-radius:0;pointer-events:none}

@media print{.lxp-cert-wrap{background:#fff;padding:0}.lxp-cert-wrap .cert{box-shadow:none;border-radius:0}.lxp-cert-wrap .cert .field input::placeholder{color:transparent}.lxp-cert-wrap .lxp-cert-actions{display:none}}

/* ── Responsive scaling: the card is a fixed 1056×816 artboard; JS scales
   the stage to the container width and sets the viewport height. ─────── */
.lxp-cert-viewport{width:100%;max-width:1056px;margin:0 auto;overflow:hidden}
.lxp-cert-stage{width:1056px;height:816px;transform-origin:0 0}

/* ── Action bar & notices (outside the certificate) ─────────────────────── */
.lxp-cert-actions{max-width:1056px;margin:20px auto 0;display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.lxp-cert-btn{font-family:inherit;font-size:14px;font-weight:600;letter-spacing:.02em;line-height:1;padding:13px 24px;border-radius:999px;border:2px solid var(--b1);cursor:pointer;transition:opacity .15s ease}
.lxp-cert-btn--primary{background:var(--b1);color:#fff}
.lxp-cert-btn--secondary{background:#fff;color:var(--b1)}
.lxp-cert-btn:hover{opacity:.88}
.lxp-cert-btn:disabled{opacity:.55;cursor:default}
.lxp-cert-btn:focus-visible{outline:3px solid rgba(40,90,165,.35);outline-offset:2px}
.lxp-cert-status{font-size:14px;font-weight:500;color:var(--w1);min-height:1.2em}
.lxp-cert-status.is-error{color:#b42318}
.lxp-cert-status.is-success{color:#067647}
.lxp-cert-notice{max-width:640px;margin:0 auto;background:#fff;border:1px solid var(--w4);border-radius:18px;padding:28px 32px;box-shadow:0 8px 24px rgba(8,72,146,.10)}
.lxp-cert-notice p{margin:0;font-size:16px;color:var(--w1)}
.lxp-cert-notice a{color:var(--b2);font-weight:600}
.lxp-cert-notice p + p{margin-top:12px}
.lxp-cert-help{max-width:1056px;margin:20px auto 0;background:#fff;border:1px solid var(--w4);border-left:4px solid var(--y1);border-radius:12px;padding:14px 20px}
.lxp-cert-help p{margin:0;font-size:14px;line-height:1.5;color:var(--w1)}
.lxp-cert-help a{color:var(--b2);font-weight:600;text-decoration:underline;overflow-wrap:anywhere}
.lxp-cert-notice + .lxp-cert-help{max-width:640px}
@media print{.lxp-cert-wrap .lxp-cert-help{display:none}}

@media (max-width:600px){.lxp-cert-wrap{padding:16px}}
