/* Amigo chat sign-in screen.
   Mobile first: an app-style screen. From 900px up it becomes a two-column web layout.
   The accent follows the site theme (--amg-rgb is set from the theme's own button colour). */
#amg_login{
	--acc:var(--amg-rgb,3,173,216);
	--brand:255,122,26;
	--ink:#0a0c12;
	--text:#f4f6fb;
	--dim:rgba(244,246,251,.68);
	--line:rgba(255,255,255,.13);
	--glass:rgba(255,255,255,.06);
	position:relative;overflow:hidden;width:100%;min-height:100vh;min-height:100dvh;color:var(--text);
	background:linear-gradient(165deg,#0d1019 0%,var(--ink) 55%,#07080d 100%);
	-webkit-font-smoothing:antialiased;
}
#amg_login *{box-sizing:border-box}
:where(#amg_login h1,#amg_login h2,#amg_login p,#amg_login ul){margin:0;padding:0}
#amg_login ul{list-style:none}
#amg_login a{color:inherit;text-decoration:none}
.amg_sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* soft light behind everything */
.amg_bg{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;overflow:hidden}
.amg_orb{position:absolute;border-radius:50%;filter:blur(90px);opacity:.42;will-change:transform}
.amg_o1{width:62vmax;height:62vmax;left:-24vmax;top:-26vmax;background:rgba(var(--brand),.55);animation:amgFloat 22s ease-in-out infinite alternate}
.amg_o2{width:56vmax;height:56vmax;right:-26vmax;bottom:-24vmax;background:rgba(var(--acc),.5);animation:amgFloat 26s ease-in-out infinite alternate-reverse}
.amg_o3{width:34vmax;height:34vmax;left:40%;top:38%;background:rgba(120,90,255,.22);animation:amgFloat 30s ease-in-out infinite alternate}
@keyframes amgFloat{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(3vmax,2vmax,0) scale(1.08)}}

.amg_shell{position:relative;z-index:1;display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
.amg_top{display:flex;align-items:center;justify-content:space-between;padding:calc(14px + env(safe-area-inset-top,0px)) 20px 8px}
#amg_login .amg_logo,#login_logo{height:38px;width:auto;display:block}
.amg_lang{display:inline-flex;align-items:center;gap:8px;height:42px;padding:0 14px;border-radius:21px;border:1px solid var(--line);background:var(--glass);color:var(--text);cursor:pointer;font-size:11px;-webkit-tap-highlight-color:transparent}
.amg_lang img{width:22px;height:auto;border-radius:3px;display:block}
.amg_lang:active{transform:scale(.96)}

.amg_main{flex:1;display:flex;flex-direction:column;justify-content:flex-end}
.amg_hero{flex:1;display:flex;flex-direction:column;justify-content:center;padding:18px 26px 28px;animation:amgRise .7s cubic-bezier(.2,.8,.2,1) both}
.amg_pill{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;margin-bottom:16px;padding:7px 14px;border-radius:999px;border:1px solid var(--line);background:var(--glass);font-size:13px;color:var(--dim)}
.amg_dot{width:8px;height:8px;border-radius:50%;background:#2ecc71;box-shadow:0 0 0 0 rgba(46,204,113,.6);animation:amgPulse 2.2s ease-out infinite}
@keyframes amgPulse{70%{box-shadow:0 0 0 9px rgba(46,204,113,0)}100%{box-shadow:0 0 0 0 rgba(46,204,113,0)}}
.amg_h1{font-size:clamp(34px,10vw,44px);line-height:1.08;letter-spacing:-.5px;font-weight:700}
.amg_h1 em{font-style:normal;background:linear-gradient(95deg,rgb(var(--brand)),rgb(var(--acc)));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.amg_sub{margin-top:14px;font-size:16px;line-height:1.5;color:var(--dim);max-width:34ch}
.amg_feats{display:none}

/* the sign-in sheet */
.amg_card{position:relative;padding:26px 20px calc(22px + env(safe-area-inset-bottom,0px));border-radius:30px 30px 0 0;border:1px solid var(--line);border-bottom:0;background:rgba(17,20,30,.78);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);box-shadow:0 -20px 60px rgba(0,0,0,.4);animation:amgSheet .6s cubic-bezier(.2,.8,.2,1) both}
.amg_grab{position:absolute;top:9px;left:50%;width:38px;height:4px;margin-left:-19px;border-radius:2px;background:rgba(255,255,255,.22)}
.amg_title{font-size:24px;font-weight:700;letter-spacing:-.2px;margin-top:6px}
.amg_lead{margin:6px 0 20px;font-size:14px;color:var(--dim)}
@keyframes amgRise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes amgSheet{from{opacity:0;transform:translateY(46px)}to{opacity:1;transform:none}}

.amg_field{position:relative;margin-bottom:12px}
.amg_fi{position:absolute;left:16px;top:50%;margin-top:-8px;font-size:15px;color:rgba(244,246,251,.45);pointer-events:none}
#amg_login .amg_input{display:block;width:100%;min-width:100%;max-width:100%;height:56px;padding:0 48px 0 46px;border-radius:16px;border:1px solid var(--line);background:var(--glass);color:var(--text);font-size:16px;outline:none;transition:border-color .15s,background .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}
#amg_login .amg_input::placeholder{color:rgba(244,246,251,.42)}
#amg_login .amg_input:focus{border-color:rgba(var(--acc),.85);background:rgba(255,255,255,.09);box-shadow:0 0 0 4px rgba(var(--acc),.18)}
.amg_eye{position:absolute;right:6px;top:50%;margin-top:-22px;width:44px;height:44px;border:0;border-radius:12px;background:transparent;color:rgba(244,246,251,.55);font-size:16px;cursor:pointer}
.amg_eye:active{background:rgba(255,255,255,.08)}

.amg_btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:56px;padding:0 20px;border:1px solid transparent;border-radius:16px;font:inherit;font-size:16px;font-weight:700;letter-spacing:.1px;cursor:pointer;color:var(--text);transition:transform .12s,box-shadow .15s,background .15s,border-color .15s;-webkit-tap-highlight-color:transparent}
.amg_btn:active{transform:scale(.98)}
.amg_primary{margin-top:4px;color:#fff;background:linear-gradient(135deg,rgb(var(--acc)),rgba(var(--acc),.74));box-shadow:0 12px 30px rgba(var(--acc),.32)}
.amg_primary:hover{box-shadow:0 14px 36px rgba(var(--acc),.45)}
.amg_outline{border-color:rgba(var(--acc),.7);background:rgba(var(--acc),.08)}
.amg_outline:hover{background:rgba(var(--acc),.16)}
.amg_ghost{background:transparent;border-color:var(--line);color:var(--dim);font-weight:600}
.amg_ghost:hover{background:var(--glass);color:var(--text)}
.amg_forgot{margin:16px 0 4px;text-align:center;font-size:14px}
.amg_forgot a{color:var(--dim);cursor:pointer;padding:8px 10px}
.amg_forgot a:hover{color:var(--text)}
.amg_or{display:flex;align-items:center;gap:12px;margin:14px 0;font-size:12px;color:rgba(244,246,251,.45);text-transform:uppercase;letter-spacing:.12em}
.amg_or:before,.amg_or:after{content:"";flex:1;height:1px;background:var(--line)}
.amg_alt{display:flex;flex-direction:column;gap:10px}

/* the small print */
.amg_foot{padding:0 16px calc(10px + env(safe-area-inset-bottom,0px));background:rgba(17,20,30,.78)}
.amg_foot #main_footer{padding:10px 0 6px;background:transparent;color:rgba(244,246,251,.5);font-size:12px}
.amg_foot #menu_main_footer ul{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 14px}
.amg_foot #menu_main_footer li{list-style:none;display:inline-block;padding:4px 0;color:rgba(244,246,251,.5)}
.amg_foot #menu_main_footer a{color:rgba(244,246,251,.55)}
.amg_foot #menu_main_footer a:hover{color:var(--text)}
.amg_foot #menu_main_footer .theme_color{color:rgba(244,246,251,.7)}
/* on a phone only the legal links stay (the year line and the language link are already elsewhere) */
.amg_foot #menu_main_footer li:first-child,.amg_foot #menu_main_footer li:nth-child(2),.amg_foot #menu_main_footer li:last-child{display:none}

/* ---------- wider screens: the web layout ---------- */
@media (min-width:900px){
	.amg_top{max-width:1180px;width:100%;margin:0 auto;padding:30px 40px 0}
	#amg_login .amg_logo,#login_logo{height:46px}
	.amg_main{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(380px,460px);gap:72px;align-items:center;justify-content:center;max-width:1180px;width:100%;margin:0 auto;padding:0 40px;flex:1}
	.amg_hero{padding:0;flex:none;max-width:560px}
	.amg_h1{font-size:clamp(48px,5.4vw,70px);line-height:1.04;letter-spacing:-1.2px}
	.amg_sub{font-size:19px;margin-top:20px;max-width:36ch}
	.amg_feats{display:flex;flex-wrap:wrap;gap:10px;margin-top:30px}
	.amg_feats li{display:inline-flex;align-items:center;gap:9px;padding:10px 16px;border-radius:999px;border:1px solid var(--line);background:var(--glass);font-size:14px;color:var(--dim)}
	.amg_feats li i{color:rgb(var(--acc));font-size:14px}
	.amg_card{padding:34px 32px 30px;border-radius:28px;border:1px solid var(--line);box-shadow:0 40px 90px rgba(0,0,0,.5),inset 0 1px 0 rgba(255,255,255,.06)}
	.amg_grab{display:none}
	.amg_title{font-size:28px;margin-top:0}
	.amg_foot{background:transparent;padding:0 40px 18px}
	.amg_foot #menu_main_footer li:first-child,.amg_foot #menu_main_footer li:nth-child(2),.amg_foot #menu_main_footer li:last-child{display:inline-block}
}
@media (min-width:900px) and (max-height:700px){
	.amg_h1{font-size:44px}
	.amg_feats{display:none}
}
@media (max-height:640px) and (max-width:899px){
	.amg_hero{padding-top:6px;padding-bottom:14px}
	.amg_sub,.amg_pill{display:none}
	.amg_lead{display:none}
	.amg_card{padding-top:22px}
}
@media (prefers-reduced-motion:reduce){
	.amg_orb,.amg_hero,.amg_card,.amg_dot{animation:none}
	.amg_btn,#amg_login .amg_input{transition:none}
}

/* ---------- the other windows (register, guest, recovery, language) on this page ---------- */
body:has(#amg_login) .small_modal_out,body:has(#amg_login) .large_modal_out,body:has(#amg_login) .over_modal_out{background:rgba(5,7,12,.74) !important;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
body:has(#amg_login) .small_modal_in,body:has(#amg_login) .large_modal_in,body:has(#amg_login) .over_modal_in{background:#12151f !important;color:#f4f6fb;border:1px solid rgba(255,255,255,.12);border-radius:26px;box-shadow:0 40px 100px rgba(0,0,0,.6);max-width:460px;margin:6vh auto;animation:amgSheet .35s cubic-bezier(.2,.8,.2,1) both}
body:has(#amg_login) .modal_pad{padding:30px 22px 22px}
body:has(#amg_login) .modal_title{font-size:22px;font-weight:700;padding-bottom:18px}
body:has(#amg_login) .modal_close{top:14px;right:14px;width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,.07);display:flex;align-items:center;justify-content:center}
body:has(#amg_login) .modal_content .full_input,body:has(#amg_login) .modal_content input[type=text],body:has(#amg_login) .modal_content input[type=password],body:has(#amg_login) .modal_content input[type=email]{height:56px;padding:0 16px;border-radius:16px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.06);color:#f4f6fb;font-size:16px;outline:none}
body:has(#amg_login) .modal_content .full_input:focus{border-color:rgba(var(--amg-rgb,3,173,216),.85);box-shadow:0 0 0 4px rgba(var(--amg-rgb,3,173,216),.18)}
body:has(#amg_login) .modal_control .theme_btn,body:has(#amg_login) .modal_control .full_button{height:56px;border:0;border-radius:16px;font-size:16px;font-weight:700;color:#fff;background:linear-gradient(135deg,rgb(var(--amg-rgb,3,173,216)),rgba(var(--amg-rgb,3,173,216),.74));box-shadow:0 12px 30px rgba(var(--amg-rgb,3,173,216),.3)}
@media (max-width:899px){
	body:has(#amg_login) .small_modal_in,body:has(#amg_login) .large_modal_in,body:has(#amg_login) .over_modal_in{position:fixed;left:0;right:0;bottom:0;top:auto;width:100%;max-width:none;margin:0;max-height:92vh;max-height:92dvh;overflow-y:auto;border-radius:30px 30px 0 0;border-bottom:0;padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));animation:amgSheet .38s cubic-bezier(.2,.8,.2,1) both}
	body:has(#amg_login) .modal_pad:before{content:"";display:block;width:38px;height:4px;border-radius:2px;background:rgba(255,255,255,.22);margin:-18px auto 14px}
}
