/* ============================================================================
   popups - the windows every Townsquare page shares (partials/ts_popups.php):
   sign in / create an account, the location window and the home community
   window, and the form fields they are built from. Loaded on every townsquare
   page: the v2 layout (theme.json vendors.global) and the inner-page shell
   (tq_shell()). Moved here from townsquare.css, which the home page does not
   load. The home window's list is places.css's.
   ============================================================================ */
/* form fields */
.tq-lab{display:block;font-size:14px;font-weight:700;color:var(--tq-navy);min-width:0}
.tq-lab input,.tq-lab select,.tq-lab textarea{display:block;margin-top:6px}
.tq-lab em{font-style:normal;color:#D0342C}
.tq-lab input,.tq-lab select,.tq-lab textarea{width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(8,15,84,.14);background:#F8F9FF;color:var(--tq-navy);font:15px var(--tq-body);transition:border-color .2s,box-shadow .2s}
.tq-lab textarea{min-height:110px;resize:vertical}
.tq-lab input:focus,.tq-lab select:focus,.tq-lab textarea:focus{outline:none;border-color:var(--tq-blue);box-shadow:0 0 0 4px rgba(19,38,243,.12);background:#fff}
/* modals */
.tq-scrim{position:fixed;inset:0;z-index:90;background:rgba(2,4,31,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);display:grid;place-items:center;padding:calc(16px + env(safe-area-inset-top,0px)) 16px calc(16px + env(safe-area-inset-bottom,0px));overflow-y:auto}
/* a window taller than the screen starts at its top (the close button and title stay reachable) and the scrim scrolls; one that fits stays centred */
.tq-scrim{align-items:safe center}
.tq-modal{width:min(560px,100%);border-radius:26px;background:#fff;color:var(--tq-navy);box-shadow:0 50px 120px rgba(0,0,0,.5);overflow:hidden;animation:tqPaneIn .3s ease;--tq-text:#080F54;--tq-soft:#3A4178;--tq-muted:#6D74A6;--tq-line:rgba(8,15,84,.1)}
.tq-mtop{position:relative;padding:26px 26px 20px;background:linear-gradient(135deg,#1326F3,#4A56FF 60%,#6A5CFF);color:#fff;overflow:hidden;isolation:isolate}
.tq-mtop::after{content:"";position:absolute;right:-30px;top:-30px;width:170px;height:170px;background:url("../media/qmelocal-mark.png") center/contain no-repeat;opacity:.2;transform:rotate(-12deg);z-index:-1}
.tq-mtop h3{font:800 24px/1.15 var(--tq-display);margin:8px 0 6px;max-width:22ch;color:inherit}
.tq-mtop p{margin:0;color:#DDE1FF;font-size:14.5px;max-width:44ch}
.tq-mtop .tq-eyebrow{color:var(--tq-yellow)}
.tq-mx{position:absolute;right:14px;top:14px;width:36px;height:36px;border-radius:50%;border:1px solid rgba(254,254,254,.3);background:rgba(254,254,254,.1);color:#fff;display:grid;place-items:center;cursor:pointer}
/* minmax(0,1fr), not the implicit auto column: a fixed-width child (the 304px
   reCAPTCHA) must not widen the column, or every field runs past the window's edge */
.tq-mbody2{padding:22px 26px 26px;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.tq-mbody2 .tq-g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (max-width:520px){.tq-mbody2 .tq-g2,.tq-mbody2 .tq-g3{grid-template-columns:minmax(0,1fr)}
.tq-mtop{padding:22px 60px 18px 16px}
.tq-mtop h3{font-size:22px}
.tq-mx{width:40px;height:40px;right:12px;top:12px}
.tq-mbody2{padding:18px 16px 22px}
}
/* the sign-in fields, the error line, a full-width button */
.tq-cin{width:100%;padding:12px 14px;border-radius:12px;border:1.5px solid transparent;background:#F4F6FF;color:#080F54;font:15px/1.4 var(--tq-body)}
.tq-cin:focus{outline:none;border-color:#1326F3;background:#fff}
.tq-cerr{margin:0;padding:10px 12px;border-radius:12px;background:#FFF1F0;border:1px solid #F5B5AE;color:#8A1C12;font-size:14px}
.tq-mbody2 .tq-btn{width:100%}
/* The sign-in window: tabs, the three steps, the captcha. */
.tq-atabs{display:flex;gap:4px;margin:16px 26px 0;padding:5px;border-radius:999px;background:#F1F3FF}
.tq-atabs button{flex:1;border:0;background:none;color:#3A4178;font:700 14px var(--tq-body);padding:10px 14px;border-radius:999px;cursor:pointer}
.tq-atabs button[aria-selected="true"]{background:linear-gradient(135deg,#1326F3,#6A5CFF);color:#fff;box-shadow:0 10px 22px -10px rgba(19,38,243,.8)}
#authModal .tq-lab{font-size:14px}
#authModal .tq-cin{margin-top:6px}
/* Autofill paints its own grey; keep autofilled fields like the others. */
.tq-cin:-webkit-autofill,.tq-cin:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 40px #F4F6FF inset;box-shadow:0 0 0 40px #F4F6FF inset;-webkit-text-fill-color:#080F54;caret-color:#080F54}
.tq-cin:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 40px #fff inset;box-shadow:0 0 0 40px #fff inset}
/* Show / hide password: the eye inside the field's right end. */
#authModal .tq-pw{position:relative;display:block;margin-top:6px}
#authModal .tq-pw .tq-cin{margin-top:0;padding-right:50px}
.tq-pw-t{position:absolute;top:50%;right:4px;transform:translateY(-50%);width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:10px;background:none;color:var(--tq-muted);cursor:pointer}
.tq-pw-t:hover,.tq-pw-t:focus-visible{color:#1326F3;outline:none;background:rgba(19,38,243,.08)}
.tq-pw-t .tq-pw-off,.tq-pw-t[aria-pressed="true"] .tq-pw-on{display:none}
.tq-pw-t[aria-pressed="true"] .tq-pw-off{display:inline-flex}
.tq-pw-t span{display:inline-flex}
#authModal .tq-mfoot{display:flex;justify-content:flex-end;font-size:14px}
#authModal .tq-mfoot a,#authModal .tq-lnk{background:none;border:0;padding:0;font:600 14px var(--tq-body);color:#1326F3;cursor:pointer}
#authModal .tq-code{font:700 22px/1 var(--tq-mono);letter-spacing:.4em;text-align:center}
#authModal .tq-anote{margin:0;font-size:14.5px;color:#3A4178;overflow-wrap:anywhere}
#authModal .tq-g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#authModal .tq-captcha{min-width:0;max-width:100%;overflow:hidden}
#authModal .tq-captcha:empty{display:none}
/* an inner page's own stylesheet (the shell) spaces every form, label and word: not in this window */
#authModal{word-spacing:normal}
#authModal :is(form,.tq-lab){margin:0}
#authModal form.tq-busy{pointer-events:none}
#authModal form.tq-busy input{opacity:.6}
.tq-spin{display:inline-block;width:16px;height:16px;margin-right:8px;vertical-align:-3px;border:2.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:tqSpin .7s linear infinite}
@keyframes tqSpin{to{transform:rotate(360deg)}}
#authModal .tq-ok{margin:0;padding:10px 12px;border-radius:12px;background:#EAFBF1;border:1px solid #9ADDB5;color:#135C33;font-size:14px}
@media (max-width:520px){#authModal .tq-g2{grid-template-columns:1fr}.tq-atabs{margin:14px 16px 0}}
/* PHONES: every window (sign-in, location, home) tighter - smaller corners,
   a shorter header and smaller type, no line under 14px. :is(.tq-scrim,#homeModal)
   carries an id's weight so the home window's own #homeModal rules give way too.
   Fields stay 16px so iOS does not zoom into them. */
@media (max-width:520px){
.tq-scrim{padding-left:10px;padding-right:10px}
:is(.tq-scrim,#homeModal) .tq-modal{border-radius:14px}
:is(.tq-scrim,#homeModal) .tq-mtop{padding:14px 50px 12px 14px}
:is(.tq-scrim,#homeModal) .tq-mtop::after{width:100px;height:100px;right:-18px;top:-18px}
:is(.tq-scrim,#homeModal) .tq-mtop .tq-eyebrow{font-size:14px;letter-spacing:.06em;gap:8px}
:is(.tq-scrim,#homeModal) .tq-mtop .tq-eyebrow::before{width:12px}
:is(.tq-scrim,#homeModal) .tq-mtop h3{font-size:18px;line-height:1.2;margin:4px 0}
:is(.tq-scrim,#homeModal) .tq-mtop p{font-size:14px;line-height:1.4}
:is(.tq-scrim,#homeModal) .tq-mx{width:32px;height:32px;right:10px;top:10px}
.tq-mbody2{padding:14px 14px 18px;gap:10px}
.tq-atabs{margin:12px 14px 0;padding:4px}
.tq-atabs button{padding:8px 10px;font-size:14px;line-height:1.25}
.tq-scrim .tq-cin,.tq-scrim .tq-lab input,.tq-scrim .tq-lab select,.tq-scrim .tq-lab textarea{padding:10px 12px}
:is(.tq-scrim,#homeModal) :is(.tq-cin,.tq-lab input,.tq-lab select,.tq-lab textarea){border-radius:10px;font-size:16px}
:is(.tq-scrim,#homeModal) .tq-lab .tq-s2 .select2-selection--single{border-radius:10px}
:is(.tq-scrim,#homeModal) .tq-btn{border-radius:10px;padding:12px 16px;font-size:15px}
:is(.tq-scrim,#homeModal) :is(.tq-cerr,.tq-ok){border-radius:10px}
:is(.tq-scrim,#homeModal) .tq-tsl-item{border-radius:10px;padding:6px 8px;gap:10px}
:is(.tq-scrim,#homeModal) .tq-tsl-th{flex-basis:40px;width:40px;height:40px;border-radius:8px}
:is(.tq-scrim,#homeModal) .tq-tsl-tx b{font-size:14px}
#homeModal .tq-hpick-title{font-size:17px}
}
/* PHONES: the sign-in window is a full-width sheet from the bottom of the
   screen. Header, tabs and form share one 16px side margin; the header and the
   tabs stay put and the form scrolls inside the sheet. js/popups.js sizes the
   sheet to the part of the screen above the on-screen keyboard (--tq-vvh /
   --tq-vvt), adds .tq-kb while the keyboard is up (the header drops its line of
   text) and keeps the focused field in view. 44px+ tap targets. */
@media (max-width:520px){
#authModal{display:flex;flex-direction:column;justify-content:flex-end;top:var(--tq-vvt,0px);bottom:auto;height:var(--tq-vvh,100%);padding:max(12px,env(safe-area-inset-top,0px)) env(safe-area-inset-right,0px) 0 env(safe-area-inset-left,0px);overflow:hidden;overscroll-behavior:contain}
#authModal[hidden]{display:none}
#authModal .tq-modal{width:100%;max-height:100%;display:flex;flex-direction:column;border-radius:18px 18px 0 0;overflow:hidden;overflow:clip}
#authModal .tq-modal:focus{outline:none}
#authModal :is(.tq-mtop,.tq-atabs){flex:none}
#authModal .tq-mtop{padding:16px 64px 16px 16px}
#authModal .tq-mtop::after{display:none}
#authModal .tq-mtop h3{max-width:none}
#authModal.tq-kb .tq-mtop{padding-block:12px}
#authModal.tq-kb .tq-mtop p{display:none}
#authModal .tq-mx{width:44px;height:44px;top:10px;right:10px;background:rgba(2,4,31,.3);background:color-mix(in srgb,var(--tq-navy,#080F54) 35%,transparent);border-color:rgba(254,254,254,.5)}
#authModal .tq-atabs{margin:14px 16px 0;padding:4px}
#authModal .tq-atabs button{min-height:44px;padding:8px 10px}
#authModal .tq-mbody2{flex:0 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:16px 16px calc(20px + env(safe-area-inset-bottom,0px));gap:14px}
#authModal .tq-cin{min-height:48px}
#authModal .tq-mbody2 .tq-code{font-size:22px}
#authModal .tq-pw .tq-cin{padding-right:52px}
#authModal .tq-pw-t{width:44px;height:44px;right:2px}
#authModal .tq-btn{min-height:48px}
#authModal .tq-g2{grid-template-columns:minmax(0,1fr)}
#authModal :is(.tq-mfoot a,.tq-lnk){min-height:44px;display:inline-flex;align-items:center}
}
/* first and last name side by side where two fit */
@media (min-width:360px) and (max-width:520px){#authModal .tq-g2.tq-names{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}
/* the master admin's place bar (partials/ts_admin_bar), above the header: the
   saved home community and place, and Reset location */
.tq-adminbar{background:var(--tq-navy,var(--site_color_g));color:var(--tq-white,#fff);font:600 14px/1.4 var(--tq-body,inherit);border-bottom:2px solid var(--tq-yellow,var(--secondary-color))}
.tq-adminbar-in{width:min(1240px,100% - 32px);margin-inline:auto;padding:6px 0;display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap}
.tq-adminbar-tx{margin:0;display:flex;flex-wrap:wrap;gap:2px 16px;min-width:0;font-size:14px}
.tq-adminbar-tx span{overflow-wrap:anywhere}
.tq-adminbar-tx b{font-weight:800;color:var(--tq-yellow,inherit)}
.tq-adminbar-f{margin:0;flex:none}
.tq-adminbar-btn{appearance:none;border:0;border-radius:999px;padding:6px 16px;background:var(--tq-yellow,var(--secondary-color));color:var(--tq-navy,var(--site_font_color_g));font:800 14px/1.3 var(--tq-body,inherit);cursor:pointer;transition:filter .2s}
.tq-adminbar-btn:hover,.tq-adminbar-btn:focus-visible{filter:brightness(1.08);outline:2px solid var(--tq-white,#fff);outline-offset:2px}
