/* Isolated membership offer components; shared dialogs and app events stay owned by app.js. */
.membership-promotion{--offer-blue:#075bc7;--offer-ink:#162c4c;--offer-muted:#52657e;--offer-line:#dbe5f1;--offer-orange:#a74709;color:var(--offer-ink);font-family:inherit}
.membership-promotion *{box-sizing:border-box}
.membership-promotion .promotion-tag{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border:1px solid #f2d8c0;border-radius:6px;background:#fff5e9;color:var(--offer-orange);font-size:11px;font-weight:700;line-height:1.4;letter-spacing:.04em}
.membership-promotion .promotion-tag::before{content:"";width:5px;height:5px;border-radius:50%;background:#cc631a}
.promotion-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:26px 0 0;padding:25px 28px;border:1px solid #c9dcf3;border-radius:18px;background:#f0f6ff;box-shadow:0 8px 22px #183c6b06}
.promotion-banner-copy{min-width:0;max-width:650px}
.membership-promotion.promotion-banner h2{margin:10px 0 6px;color:var(--offer-ink);font-size:24px;line-height:1.3;letter-spacing:-.035em}
.membership-promotion.promotion-banner p{margin:0 0 10px;font-size:13px;line-height:1.75;color:var(--offer-muted);white-space:pre-line;overflow-wrap:anywhere}
.membership-promotion .promotion-date{display:block;color:var(--offer-muted);font-size:11px;line-height:1.7}
.membership-promotion .promotion-countdown{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.membership-promotion .promotion-countdown-caption{color:var(--offer-muted);font-size:11px;font-weight:500}
.membership-promotion .promotion-countdown strong{color:var(--offer-blue);font-size:25px;line-height:1.3;font-weight:650;letter-spacing:-.045em;font-variant-numeric:tabular-nums;white-space:nowrap}
.membership-promotion .promotion-countdown small{color:var(--offer-muted);font-size:11px;line-height:1.6}
.promotion-plan-price{display:flex;flex-direction:column;gap:8px;margin:24px 0 18px;min-height:85px}
.promotion-price-current{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}
.promotion-price-current b{font-family:"SF Pro Display","Avenir Next",sans-serif;color:#142e50;font-size:43px;line-height:1.15;font-weight:650;letter-spacing:-.055em;font-variant-numeric:tabular-nums}
.promotion-price-current>span:last-child{color:#5a6c84;font-size:11px}
.promotion-price-current .promotion-price-label{flex-basis:100%;color:#a74709;font-size:10px;font-weight:700;letter-spacing:.04em}
.promotion-price-after{color:#5a6c84;font-size:11px;line-height:1.7}
.promotion-price-after strong{color:#3c526e;font-weight:600}
.promotion-price-after>span{color:#5a6c84}
.is-promotion-active .promotion-price-current b{color:#075bc7}
/* The application adds this class only while this popup owns the shared dialog. */
#dialog.promotion-dialog{isolation:isolate;width:min(660px,calc(100vw - 32px));max-width:none;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid #789dcc59;border-radius:26px;background:#09162c;color:#f3f7ff;box-shadow:0 35px 110px #020815a8,0 0 0 1px #172b4640;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#3e5c80 #09162c;color-scheme:dark}
#dialog.promotion-dialog::backdrop{background:#030b1cbd;backdrop-filter:blur(10px)}
#dialog.promotion-dialog>.dialog-close{z-index:3;top:12px;right:12px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #bed7ff29;border-radius:50%;background:#183353c9;color:#d1e4ff;font-size:25px;line-height:1;transition:background .2s,color .2s}
#dialog.promotion-dialog>.dialog-close:hover{background:#284d75;color:#fff}
#dialog.promotion-dialog>.dialog-close:focus-visible{outline:3px solid #8be6ff;outline-offset:3px}
.membership-promotion.promotion-popup{--offer-blue:#8adfff;--offer-ink:#f3f7ff;--offer-muted:#b0c2dc;--offer-line:#a2c5ff2e;position:relative;isolation:isolate;padding:28px 28px 12px;overflow:hidden;background:radial-gradient(ellipse at 97% 5%,#1164a440,transparent 51%),radial-gradient(ellipse at -8% 53%,#143d7626,transparent 65%),#09162c;color:var(--offer-ink);animation:promotion-popup-enter .4s ease-out both}
.promotion-popup>*:not(.promotion-popup-sky){position:relative;z-index:1}
.promotion-popup .promotion-popup-sky{position:absolute;z-index:0;inset:0;pointer-events:none}
.promotion-popup-sky::before{content:"";position:absolute;top:-145px;right:-65px;width:360px;height:360px;border:1px solid #7399c41c;border-radius:50%;box-shadow:0 0 0 44px #81b6e207,0 0 0 88px #81b6e205}
.promotion-popup-sky i{position:absolute;width:3px;height:3px;border-radius:50%;background:#b9e8ff;box-shadow:0 0 9px #78d4ff88}
.promotion-popup-sky i:nth-child(1){top:78px;left:46%;opacity:.6}.promotion-popup-sky i:nth-child(2){top:172px;right:22px;opacity:.7}.promotion-popup-sky i:nth-child(3){top:42px;left:43%;width:2px;height:2px;opacity:.4}.promotion-popup-sky i:nth-child(4){top:238px;left:13px;width:2px;height:2px;opacity:.6}.promotion-popup-sky i:nth-child(5){top:27px;right:127px;background:#efcf96;opacity:.8}.promotion-popup-sky i:nth-child(6){top:208px;right:38%;width:2px;height:2px;opacity:.5}
.promotion-popup .promotion-popup-brand{display:flex;align-items:center;gap:10px;padding-right:44px;margin-bottom:20px;font-size:14px;font-weight:650;letter-spacing:.08em;color:#e8f3ff}
.promotion-popup-brand>span:nth-child(2){display:flex;flex-direction:column;gap:4px;line-height:1.2}
.promotion-popup-brand small{font-size:7px;font-weight:600;letter-spacing:.2em;color:#95b3d3}
.promotion-popup .promotion-brand-symbol{position:relative;flex:0 0 29px;width:29px;height:29px;border:1px solid #8bdbff94;border-radius:8px;background:linear-gradient(145deg,#14548a,#122c52);box-shadow:inset 0 0 11px #70d5ff22,0 0 15px #2cb9ff16;transform:rotate(-8deg)}
.promotion-brand-symbol::before{content:"";position:absolute;inset:7px;border:1px solid #94e5ff;border-radius:2px;transform:rotate(45deg)}
.promotion-brand-symbol::after{content:"";position:absolute;top:2px;right:2px;width:6px;height:6px;background:#f2ce91;clip-path:polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%)}
.promotion-popup .promotion-popup-edition{margin-left:auto;padding-right:17px;color:#7b9abf;font-family:"SFMono-Regular",Menlo,monospace;font-size:8px;font-weight:500;letter-spacing:.11em}
.promotion-popup .promotion-popup-hero{display:grid;grid-template-columns:minmax(0,1fr) 144px;align-items:center;gap:12px;min-height:128px;margin-top:-6px}
.promotion-popup .promotion-tag{padding:5px 9px;border-color:#edce8c40;border-radius:5px;background:#d9af4b12;color:#edcf97;font-size:10px;line-height:1.3;letter-spacing:.07em}
.promotion-popup .promotion-tag::before{width:4px;height:4px;background:#f1ce8a;box-shadow:0 0 7px #f1ce8a5c}
.membership-promotion.promotion-popup .modal-title{margin:13px 0 8px;color:#f4f8ff;font-family:"SF Pro Display","Avenir Next","PingFang SC",sans-serif;font-size:34px;font-weight:750;line-height:1.3;letter-spacing:-.04em;overflow-wrap:anywhere;text-wrap:balance}
.membership-promotion.promotion-popup .promotion-message{margin:6px 0 20px;color:#b6c8df;font-size:12px;line-height:1.8;white-space:pre-line;overflow-wrap:anywhere}
.promotion-popup .promotion-vault{position:relative;width:144px;height:144px;margin-top:-6px;pointer-events:none}
.promotion-vault-orbit{position:absolute;z-index:2;left:0;top:51px;width:145px;height:49px;border:1px solid #5dcff459;border-radius:50%;transform:rotate(-29deg);box-shadow:0 -1px 0 #b5f1ff16}
.promotion-vault-orbit.is-tilted{z-index:0;left:10px;top:47px;width:125px;height:62px;border-color:#e0c1872e;transform:rotate(43deg)}
.promotion-vault-frame{position:absolute;z-index:1;left:33px;top:26px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:82px;height:91px;border:1px solid #8cddff8c;border-radius:17px;background:linear-gradient(145deg,#2879b9b5,#103562e6 58%,#0f2547);box-shadow:inset 0 1px 0 #d4f4ff4d,inset 0 0 22px #287dc43b,0 10px 34px #1797ed26;transform:rotate(-12deg);animation:promotion-vault-float 7s ease-in-out infinite}
.promotion-vault-frame::before{content:"";position:absolute;inset:7px;border:1px solid #95dfff26;border-radius:11px}
.promotion-vault-code{color:#c2f3ff;font-family:"SFMono-Regular",Menlo,monospace;font-size:28px;font-weight:500;line-height:1;letter-spacing:-.13em;text-shadow:0 0 20px #53ddff61}
.promotion-vault-caption{color:#99c9e7;font-family:"SFMono-Regular",Menlo,monospace;font-size:6px;letter-spacing:.13em}
.promotion-vault-star,.promotion-vault-spark{position:absolute;z-index:3;top:12px;right:15px;width:17px;height:17px;background:#f1d39e;clip-path:polygon(50% 0,62% 37%,100% 50%,62% 63%,50% 100%,38% 63%,0 50%,38% 37%)}
.promotion-vault-spark{top:auto;right:auto;bottom:16px;left:18px;width:9px;height:9px;background:#7fddff}
.promotion-popup .promotion-popup-offer{overflow:hidden;border:1px solid #7eade33d;border-radius:16px;background:#0d1f36b8;box-shadow:inset 0 1px 0 #b7dcff08}
.promotion-popup-offer-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px 0;color:#c5d7ed;font-size:11px;line-height:1.5}
.promotion-popup-offer-heading>span:last-child{flex-shrink:0;color:#e7c994;font-size:10px}
.promotion-popup .promotion-popup-plans{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0;padding:13px 14px 15px}
.promotion-popup .promotion-popup-plan{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;padding:13px 12px 12px;border:1px solid #6e9bce29;border-radius:10px;background:#152b4552}
.promotion-popup .promotion-popup-plan.is-featured{border-color:#67c4fb69;background:linear-gradient(155deg,#2462a536,#2a659210);box-shadow:inset 0 1px 0 #9cdfff14}
.promotion-popup .promotion-popup-plan-name{color:#dcecff;font-size:12px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.promotion-popup .promotion-popup-plans strong{max-width:100%;margin:3px 0 0;color:#e8f6ff;font-family:"Avenir Next","SF Pro Display",sans-serif;font-size:34px;font-weight:650;line-height:1.1;letter-spacing:-.065em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.promotion-popup .promotion-popup-plan.is-featured strong{color:#9beaff}
.promotion-popup .promotion-popup-plan-duration{color:#a8c0db;font-size:10px;line-height:1.5}
.promotion-popup .promotion-popup-plans small{color:#c7b791;font-size:10px;line-height:1.6;overflow-wrap:anywhere}
.promotion-popup .promotion-popup-plan-quota{margin-top:3px;color:#a8c0db;font-size:10px;line-height:1.5;overflow-wrap:anywhere}
.membership-promotion.promotion-popup .promotion-countdown{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px 14px;padding:13px 17px;border-top:1px solid #7eade326;border-radius:0;background:#16436b1f}
.membership-promotion.promotion-popup .promotion-countdown-caption{color:#c8d9eb;font-size:11px;line-height:1.5}
.membership-promotion.promotion-popup .promotion-countdown strong{grid-column:2;grid-row:1/3;color:#a1eaff;font-family:"Avenir Next","SFMono-Regular",Menlo,monospace;font-size:25px;font-weight:600;line-height:1.3;letter-spacing:-.03em;text-shadow:0 0 21px #54ceff22}
.membership-promotion.promotion-popup .promotion-countdown small{color:#91aac7;font-size:10px;line-height:1.5}
.membership-promotion.promotion-popup .promotion-popup-date{display:flex;align-items:flex-start;gap:8px;margin:15px 0;color:#a6bcd5;font-size:10px;line-height:1.9;overflow-wrap:anywhere}
.promotion-popup-clock{position:relative;flex:0 0 12px;width:12px;height:12px;margin-top:3px;border:1px solid #8faac7;border-radius:50%}
.promotion-popup-clock::after{content:"";position:absolute;left:5px;top:2px;width:3px;height:4px;border-bottom:1px solid #8faac7;border-left:1px solid #8faac7}
.membership-promotion .button.promotion-primary{border:1px solid #075bc7;border-radius:9px;background:#075bc7;color:#fff;box-shadow:0 4px 9px #075bc718;font-weight:600}
.membership-promotion .button.promotion-primary:hover{background:#064eaa;border-color:#064eaa;transform:translateY(-1px)}
.membership-promotion .button.promotion-primary:disabled{opacity:.55;transform:none}
.membership-promotion button:focus-visible,.membership-promotion input:focus-visible,.membership-promotion textarea:focus-visible{outline:3px solid #88b7f4;outline-offset:3px}
.membership-promotion .promotion-hide-today{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;margin-top:8px;color:var(--offer-muted);font-size:11px;cursor:pointer}
.membership-promotion input[type="checkbox"]{width:16px;height:16px;margin:0;accent-color:var(--offer-blue);flex-shrink:0}
/* Popup overrides stay separate from the public price cards and admin editor. */
.membership-promotion.promotion-popup .button.promotion-primary{display:flex;align-items:center;justify-content:center;gap:13px;min-height:48px;padding:12px 18px;border:1px solid #a4e6ff94;border-radius:10px;background:linear-gradient(105deg,#78baff,#7ce9ef);color:#06243d;box-shadow:0 7px 25px #20a6e726,inset 0 1px 0 #efffff4d;font-size:14px;font-weight:750;line-height:1.5;transition:filter .2s,box-shadow .2s,transform .2s}
.membership-promotion.promotion-popup .button.promotion-primary>span{font-size:21px;font-weight:400;line-height:1}
.membership-promotion.promotion-popup .button.promotion-primary:hover{background:linear-gradient(105deg,#8ac5ff,#9af3f5);box-shadow:0 9px 28px #20a6e736;transform:translateY(-1px)}
.membership-promotion.promotion-popup .button.promotion-primary:focus-visible,.membership-promotion.promotion-popup input:focus-visible{outline:3px solid #d1f6ff;outline-offset:4px}
.membership-promotion.promotion-popup .promotion-hide-today{min-height:42px;margin:5px 0 0;color:#abc0d9;font-size:11px;line-height:1.5}
.membership-promotion.promotion-popup .promotion-hide-today input{width:15px;height:15px;accent-color:#8ee8ff;cursor:pointer}
.promotion-admin{margin-bottom:22px}
.promotion-admin-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}
.promotion-eyebrow{display:block;color:var(--offer-blue);font-size:9px;font-weight:700;letter-spacing:.15em;margin-bottom:7px}
.membership-promotion .promotion-admin-heading h2{margin:0 0 7px;color:var(--offer-ink);font-size:22px;letter-spacing:-.025em}
.membership-promotion .promotion-admin-heading p{margin:0;color:var(--offer-muted);font-size:12px;line-height:1.7}
.promotion-admin-status{flex-shrink:0;padding:5px 9px;border-radius:6px;background:#edf1f6;color:#576980;font-size:11px;line-height:1.5}
.promotion-admin-status[data-promotion-status="active"]{background:#e7f1ff;color:#075bc7}
.promotion-admin-status[data-promotion-status="scheduled"]{background:#fff2e5;color:#a74709}
.promotion-form-copy{display:grid;grid-template-columns:minmax(190px,1fr) minmax(240px,1.6fr);gap:18px;align-items:start}
.membership-promotion .field{margin:0 0 18px}
.membership-promotion .field>label{display:block;margin-bottom:8px;color:var(--offer-ink);font-size:11px;font-weight:600}
.membership-promotion .field input:not([type="checkbox"]),.membership-promotion .field textarea{width:100%;min-height:41px;padding:10px 12px;border:1px solid #d1ddea;border-radius:8px;color:var(--offer-ink);background:#fff;font:inherit;font-size:12px;line-height:1.55}
.membership-promotion .field textarea{resize:vertical;min-height:70px}
.membership-promotion .field input::placeholder,.membership-promotion .field textarea::placeholder{color:#738399}
.promotion-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:730px}
.promotion-price-editor{padding:19px 20px 3px;border:1px solid var(--offer-line);border-radius:12px;background:#f8faff}
.promotion-price-editor-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:15px}
.membership-promotion .promotion-price-editor-heading h3{margin:0;color:var(--offer-ink);font-size:14px}
.promotion-price-editor-heading>span{color:var(--offer-muted);font-size:10px}
.promotion-price-table{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.promotion-price-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 10px;min-width:0;margin:0;padding:10px 0 0;border:0}
.promotion-price-row>legend{padding:0;color:var(--offer-ink);font-size:13px;font-weight:650}
.promotion-price-row>.field:first-of-type{grid-column:1/-1}
.membership-promotion .promotion-price-row .promotion-current-input{border-color:transparent;background:#eaf0f8;color:#52657e;cursor:default;font-variant-numeric:tabular-nums}
.promotion-switches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:23px 0 17px}
.promotion-switch{display:flex;align-items:flex-start;gap:10px;cursor:pointer}
.promotion-switch>input{margin-top:2px!important}
.promotion-switch>span{display:flex;flex-direction:column;gap:5px}
.promotion-switch strong{color:var(--offer-ink);font-size:12px;font-weight:600}
.promotion-switch small{color:var(--offer-muted);font-size:11px;line-height:1.7}
.membership-promotion .promotion-admin-note{padding:12px 14px;margin:0 0 16px;border-radius:8px;background:#f2f5f9;color:var(--offer-muted);font-size:11px;line-height:1.9}
.promotion-admin-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.promotion-admin-actions>.text-link{padding:10px;color:var(--offer-muted);font-size:11px}
.promotion-admin-feedback{margin-top:12px;color:var(--offer-blue);font-size:12px;line-height:1.8}
@media(max-width:1000px){.promotion-price-table{gap:14px}.promotion-price-row{grid-template-columns:1fr}.promotion-price-row>.field:first-of-type{grid-column:auto}}
@media(max-width:700px){.promotion-banner{align-items:flex-start;flex-direction:column;gap:20px;padding:22px}.membership-promotion .promotion-countdown{align-items:flex-start}.membership-promotion.promotion-banner h2{font-size:22px}.promotion-form-copy,.promotion-date-fields{grid-template-columns:1fr;gap:0}.promotion-price-table{grid-template-columns:1fr}.promotion-price-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.promotion-price-row+.promotion-price-row{border-top:1px solid var(--offer-line);padding-top:15px}.promotion-price-row>legend{padding-top:5px}.promotion-price-editor{padding:16px 14px 0}.promotion-price-row .field>label{font-size:10px}.membership-promotion .promotion-price-row .field input{padding:10px 7px}.promotion-switches{grid-template-columns:1fr;gap:17px}.promotion-admin-heading{gap:10px}.promotion-price-current b{font-size:40px}.promotion-plan-price{min-height:0}.promotion-admin-actions .button{flex-grow:1}}
@media(max-width:520px){#dialog.promotion-dialog{width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:20px}#dialog.promotion-dialog>.dialog-close{top:10px;right:10px;width:44px;height:44px}.membership-promotion.promotion-popup{padding:23px 20px 8px}.promotion-popup .promotion-popup-brand{margin-bottom:17px}.promotion-popup .promotion-popup-edition{display:none}.promotion-popup .promotion-popup-hero{grid-template-columns:minmax(0,1fr) 106px;min-height:108px;gap:5px}.promotion-popup .promotion-vault{width:106px;height:118px;margin-left:-9px;transform:scale(.82);transform-origin:left center}.membership-promotion.promotion-popup .modal-title{font-size:28px}.membership-promotion.promotion-popup .promotion-message{margin:2px 0 17px;font-size:11px;line-height:1.8}.promotion-popup-offer-heading{padding:12px 12px 0;font-size:10px}.promotion-popup-offer-heading>span:last-child{font-size:9px}.promotion-popup .promotion-popup-plans{gap:6px;padding:11px 9px 12px}.promotion-popup .promotion-popup-plan{gap:4px;padding:11px 8px 10px;border-radius:8px}.promotion-popup .promotion-popup-plan-name{font-size:11px}.promotion-popup .promotion-popup-plans strong{font-size:clamp(19px,5.4vw,28px)}.promotion-popup .promotion-popup-plan-duration,.promotion-popup .promotion-popup-plans small,.promotion-popup .promotion-popup-plan-quota{font-size:10px}.membership-promotion.promotion-popup .promotion-countdown{padding:11px 12px;gap:3px 8px}.membership-promotion.promotion-popup .promotion-countdown strong{font-size:21px}.membership-promotion.promotion-popup .promotion-countdown-caption,.membership-promotion.promotion-popup .promotion-countdown small{font-size:10px}.membership-promotion.promotion-popup .promotion-popup-date{margin:13px 0;font-size:10px;line-height:1.85}.membership-promotion.promotion-popup .button.promotion-primary{min-height:47px;font-size:13px}.membership-promotion.promotion-popup .promotion-hide-today{min-height:44px;font-size:11px}}
@media(max-width:370px){.membership-promotion.promotion-popup{padding:22px 15px 7px}.promotion-popup .promotion-popup-hero{grid-template-columns:minmax(0,1fr) 88px}.promotion-popup .promotion-vault{transform:scale(.7);margin-left:-14px}.membership-promotion.promotion-popup .modal-title{font-size:25px}.membership-promotion.promotion-popup .promotion-countdown strong{font-size:19px;letter-spacing:-.04em}.promotion-price-row{grid-template-columns:1fr}.promotion-price-row>.field:first-of-type{grid-column:auto}}
@keyframes promotion-popup-enter{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:translateY(0)}}
@keyframes promotion-vault-float{0%,100%{transform:translateY(0) rotate(-12deg)}50%{transform:translateY(-4px) rotate(-10deg)}}
@media(prefers-reduced-motion:reduce){.membership-promotion .button.promotion-primary{transition:none}.membership-promotion .button.promotion-primary:hover{transform:none}.membership-promotion.promotion-popup,.promotion-popup .promotion-vault-frame{animation:none}#dialog.promotion-dialog>.dialog-close{transition:none}}
