/* ---------- Sign-up terms ----------
   The checkbox above the registration form's submit button, and the popup its
   link opens. inc/signup-terms.php, assets/js/signup-terms.js. */

/* ---- The checkbox ---- */

.km-terms{margin:0 0 18px}
.km-terms-agree{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;line-height:1.5}
.km-terms-agree input[type=checkbox]{flex:0 0 auto;width:18px;height:18px;margin:0;accent-color:var(--red);cursor:pointer;transform:translateY(3px)}
.km-terms-agree label{margin:0;font-size:.92rem;color:var(--ink);cursor:pointer}

/* A link in every way but the element: it opens the popup, so it is a button
   and needs the element reset. */
.km-terms-link{padding:0;border:0;background:none;font:700 .92rem var(--body);color:var(--red);text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.km-terms-link:hover{color:var(--blue)}
.km-terms-link:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.km-terms-message{margin:8px 0 0;font-size:.85rem;font-weight:600;color:var(--red)}
.km-terms--error .km-terms-agree input[type=checkbox]{outline:2px solid var(--red);outline-offset:2px}

/* ---- The popup ---- */

.terms-modal{position:fixed;inset:0;z-index:700;display:grid;place-items:center;padding:24px}
.terms-modal[hidden]{display:none}
.terms-backdrop{position:absolute;inset:0;background:rgba(4,16,35,.72);backdrop-filter:blur(2px)}

.terms-panel{position:relative;z-index:1;display:flex;flex-direction:column;width:min(720px,100%);max-height:calc(100vh - 48px);border-radius:16px;background:#fff;box-shadow:0 40px 90px rgba(4,16,35,.4);overflow:hidden}

.terms-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:26px 28px 18px;border-bottom:1px solid #eef1f6}
.terms-head .overline{display:block;font-size:.68rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:var(--blue)}
.terms-head h2{margin:6px 0 0;font:800 1.6rem/1.1 var(--km-display);letter-spacing:-.035em;color:var(--ink)}
.terms-close{display:grid;place-content:center;width:36px;height:36px;padding:0 0 3px;border:1px solid #dde3ec;border-radius:50%;background:#fff;color:var(--ink);font-size:1.6rem;line-height:1;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
.terms-close:hover{background:var(--red);border-color:var(--red);color:#fff}
.terms-close:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

.terms-body{flex:1 1 auto;overflow-y:auto;padding:22px 28px;color:var(--ink);font-size:.94rem;line-height:1.6}
.terms-body:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}
.terms-body h3{margin:22px 0 10px;font:800 1.02rem var(--km-display);letter-spacing:-.01em;color:var(--blue)}
.terms-body h3:first-child{margin-top:0}
.terms-body ul{display:grid;gap:9px;margin:0;padding:0;list-style:none}
.terms-body li{position:relative;padding-left:22px;color:#3e4654}
.terms-body li:before{content:'';position:absolute;left:0;top:9px;width:8px;height:8px;border-radius:50%;background:var(--red)}
.terms-body p{margin:0 0 12px;color:#3e4654}

.terms-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px;padding:18px 28px 22px;border-top:1px solid #eef1f6;background:#f7f9fc}
.terms-foot p{margin:0;max-width:330px;font-size:.84rem;color:var(--muted)}
.terms-actions{display:flex;gap:10px}
.terms-foot .button{border:0;font-family:var(--body);line-height:1;cursor:pointer}

@media(max-width:560px){
	.terms-head,.terms-body,.terms-foot{padding-left:20px;padding-right:20px}
	.terms-foot{flex-direction:column;align-items:stretch}
	.terms-actions .button{flex:1}
}
