/* Legacy Partners — rank certificates & social posts page */
/* Completion certificate pop-ups */
.lpc { position: fixed; inset: 0; z-index: 2200; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: 'Poppins', sans-serif; }
.lpc-shade { position: absolute; inset: 0; background: rgba(0,20,40,.7); }
.lpc-box { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: var(--white); color: var(--navy); border-radius: 20px; padding: 28px 28px 24px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.lpc-cert .lpc-box { max-width: 920px; padding: 26px 28px 20px; }
.lpc-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.lpc-x:hover { background: var(--soft); color: var(--navy); }
.lpc-k { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); }
.lpc-h { margin: 0 36px 10px 0; font-size: 24px; line-height: 1.25; font-weight: 800; }
.lpc-p { margin: 0 0 18px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.lpc-form { display: flex; flex-direction: column; }
.lpc-l { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.lpc-in { font: inherit; font-size: 17px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 16px; color: var(--navy); background: var(--white); }
.lpc-in:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,101,167,.15); }
.lpc-in.bad { border-color: #B42318; box-shadow: 0 0 0 4px rgba(180,35,24,.12); }
.lpc-err { margin: -6px 0 14px; min-height: 1px; font-size: 14px; font-weight: 600; color: #B42318; }
.lpc-err:empty { margin: 0; }
.lpc-go { align-self: stretch; justify-content: center; }
.lpc-frame { margin: 8px 0 18px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,39,76,.12); background: var(--soft); aspect-ratio: 1056 / 816; display: grid; place-items: center; }
.lpc-img { width: 100%; height: 100%; display: block; }
.lpc-wait { margin: 0; font-size: 15px; color: var(--muted); }
.lpc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lpc-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.lpc-msg { margin: 12px 0 0; min-height: 1.5em; font-size: 14px; font-weight: 600; color: var(--blue); }
.lpc-fix { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.lpc-edit { font: inherit; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 600px) { .lpc-box { padding: 22px 18px 18px; } .lpc-h { font-size: 20px; } .lpc-actions .btn { flex: 1 1 100%; justify-content: center; } }

/* Rank cards */
.rk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.rk-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,39,76,.06); transition: transform .2s, box-shadow .2s; }
.rk-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,39,76,.14); }
.rk-thumbwrap { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: var(--tint, #EAF0F8); cursor: pointer; }
.rk-stage { position: absolute; left: 0; top: 0; width: 560px; height: 350px; transform-origin: 0 0; }
.rk-mini { position: absolute; overflow: hidden; box-shadow: 0 10px 26px rgba(0,25,55,.28); border-radius: 4px; background: #fff; }
.rk-mini > div { transform-origin: 0 0; }
.rk-mini-cert { left: 26px; top: 40px; width: 359px; height: 277px; } .rk-mini-cert > div { transform: scale(.34); }
.rk-mini-post { left: 330px; top: 26px; width: 216px; height: 270px; border-radius: 8px; } .rk-mini-post > div { transform: scale(.2); }
.rk-thumbseal { position: absolute; left: 270px; top: 218px; width: 112px; height: 112px; filter: drop-shadow(0 8px 14px rgba(0,0,0,.3)); }
.rk-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 22px 24px 24px; }
.rk-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--white); background: var(--rk, var(--navy)); padding: 5px 12px; border-radius: 999px; }
.rk-title { margin: 6px 0 0; font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--navy); }
.rk-text { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.rk-body .btn { margin-top: auto; align-self: flex-start; }
.rk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.rk-steps div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 16px; padding: 16px 18px; color: #DCE6F2; font-size: 14.5px; line-height: 1.55; }
.rk-steps strong { display: block; color: var(--gold); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }

/* Form */
.rk .lpc-box { max-width: 520px; }
.rk-help { margin: -10px 0 16px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.rk-opt { font-weight: 400; color: var(--muted); }
.rk-drop { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; padding: 16px; border: 2px dashed #B9C7D8; border-radius: 16px; background: var(--soft); cursor: pointer; transition: border-color .15s, background .15s; }
.rk-drop:hover, .rk-drop:focus-visible, .rk-drop.over { border-color: var(--blue); background: #EAF1FA; outline: none; }
.rk-thumb { flex: none; width: 76px; height: 76px; border-radius: 50%; object-fit: contain; padding: 0 12px; box-sizing: border-box; background: var(--white); border: 3px solid var(--white); box-shadow: 0 4px 12px rgba(0,39,76,.15); }
.rk-thumb.has { object-fit: cover; padding: 0; }
.rk-drop-txt { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; color: var(--navy); line-height: 1.4; }
.rk-link { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rk-sub { font-size: 12.5px; color: var(--muted); }
.rk-remove { align-self: flex-start; margin: 0 0 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Results */
.rk-result .lpc-box { max-width: 1100px; }
.rk-out { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 6px; }
.rk-pt { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); }
.rk-frame { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,39,76,.12); background: var(--soft); display: grid; place-items: center; margin-bottom: 14px; }
.rk-frame-cert { aspect-ratio: 1056 / 816; } .rk-frame-post { aspect-ratio: 1080 / 1350; }
.rk-frame img { width: 100%; height: 100%; display: block; }
.rk-frame .lpc-wait { padding: 0 16px; text-align: center; }
.rk .lpc-actions .btn[disabled] { opacity: .5; cursor: progress; }
@media (max-width: 760px) { .rk-out { grid-template-columns: 1fr; } .rk-pane-post { max-width: 420px; } }

/* Photo cropper */
.rk-crop { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 22px; margin: 6px 0 14px; padding: 16px; border: 2px dashed #B9C7D8; border-radius: 16px; background: var(--soft); }
.rk-crop.over { border-color: var(--blue); background: #EAF1FA; }
.rk-view { position: relative; flex: none; width: 180px; height: 180px; border-radius: 50%; overflow: hidden; background: var(--white); box-shadow: 0 0 0 4px var(--white), 0 6px 18px rgba(0,39,76,.22); cursor: grab; touch-action: none; user-select: none; }
.rk-view.dragging { cursor: grabbing; }
.rk-view:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.rk-view img { position: absolute; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.rk-crop-ctl { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.rk-crop-tip { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.rk-crop-tip strong { display: block; font-size: 14.5px; color: var(--navy); }
.rk-zoom { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--navy); }
.rk-zoom input { flex: 1; accent-color: var(--blue); height: 28px; }
.rk-crop-links { margin: 0; display: flex; gap: 18px; }
.rk-replace, .rk-crop .rk-remove { margin: 0; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--blue); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 480px) { .rk-crop { justify-content: center; } .rk-view { width: 200px; height: 200px; } }
.rk-drop[hidden], .rk-crop[hidden] { display: none; }

/* Confetti on the "Celebrate" step (sits behind the text) */
.rk-steps .rk-party { position: relative; overflow: hidden; isolation: isolate; }
.rk-party i { position: absolute; z-index: -1; display: block; border-radius: 2px; pointer-events: none; opacity: .9; }
.rk-party i.dot { border-radius: 50%; }
/* "Certificate from" choices */
.rk-from, .rk-ranks { border: 0; margin: 4px 0 14px; padding: 0; display: grid; gap: 8px; }
.rk-from legend, .rk-ranks legend { padding: 0; margin-bottom: 6px; }
.rk-radio { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid var(--line, #D5DDE8); border-radius: 12px; cursor: pointer; font-size: 15px; font-weight: 500; transition: border-color .15s, background .15s; }
.rk-radio:hover { border-color: #2F65A7; }
.rk-radio input, .rk-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rk-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #9AAABD; display: grid; place-items: center; background: #fff; }
.rk-dot::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #00274C; transform: scale(0); transition: transform .15s; }
.rk-radio:has(input:checked) { border-color: #00274C; background: #FFFBE6; }
.rk-radio input:checked + .rk-dot { border-color: #00274C; }
.rk-radio input:checked + .rk-dot::after { transform: scale(1); }
.rk-radio input:focus-visible + .rk-dot { box-shadow: 0 0 0 4px rgba(47,101,167,.3); }
.rk-other { margin: 0 0 4px; padding: 16px 16px 2px; border-radius: 14px; background: #F3F6FA; }
.rk-other[hidden] { display: none; }
.rk-other .lpc-in { background: #fff; }
.rk-ranks { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.rk-chip { position: relative; cursor: pointer; }
.rk-chip span { display: block; text-align: center; padding: 9px 8px; border: 1.5px solid var(--line, #D5DDE8); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; transition: border-color .15s, background .15s, color .15s; }
.rk-chip:hover span { border-color: #2F65A7; }
.rk-chip input:checked + span { background: #00274C; border-color: #00274C; color: #fff; }
.rk-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(47,101,167,.3); }
.rk-other:not([hidden]) { display: flex; flex-direction: column; }
/* The certificate now shows its own larger seal, so the extra seal over the card thumbnail is hidden */
.rk-thumbseal { display: none; }
