/* ---- เข้าด้วย Google / Facebook (client-debug/js/oauth.js, src/login/oauth.js; Noh 2026-11-06): the buttons of the login /
   sign-up windows in the brands' own colours and marks, the hint of an app's own browser, the name window (the sign-up
   window's look: .reg-card) and the game's window บัญชี Google / Facebook. Loaded after the themes (client/index.html,
   client-debug/index.html). ---- */
.oa-box { margin: 14px 0 2px; }
.oa-or { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1; }
.oa-or::before, .oa-or::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: 0.35; }
.oa-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
#screen-login .oa-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: auto; min-height: 42px; margin: 0;
	padding: 0 12px; border-radius: 6px; font: 600 15px/1.2 var(--font, sans-serif); letter-spacing: 0; text-shadow: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); cursor: pointer; white-space: nowrap; }
#screen-login .oa-btn .oa-mark { flex: none; width: 20px; height: 20px; }
#screen-login .oa-btn.oa-google { background: #fff; border: 1px solid #dadce0; color: #3c4043; }
#screen-login .oa-btn.oa-google:hover:not(:disabled) { background: #f7f9ff; border-color: #c4d2f0; }
#screen-login .oa-btn.oa-facebook { background: #1877f2; border: 1px solid #1468d8; color: #fff; }
#screen-login .oa-btn.oa-facebook:hover:not(:disabled) { background: #166fe5; }
#screen-login .oa-btn:disabled { opacity: 0.6; cursor: progress; }
#screen-login .oa-btn:focus-visible { outline: 2px solid #f2c24a; outline-offset: 2px; }
.oa-last { position: absolute; top: -8px; right: 6px; padding: 0 6px; border-radius: 8px; background: #f2c24a; color: #3a2a00; font: 700 10px/15px var(--font, sans-serif); font-style: normal;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); pointer-events: none; }
/* an app's own browser: Google's sign-in refused there - open the page in Chrome / Safari */
.oa-inapp { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed #c98a0e; border-radius: 8px; background: rgba(255, 214, 90, 0.16); font-size: 12.5px; line-height: 1.45; text-align: left; white-space: normal; }
.oa-inapp b { display: block; }
.oa-inapp small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.oa-inapp-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.oa-inapp-btns button, .oa-inapp-btns .oa-chrome { min-height: 28px; padding: 3px 10px; font-size: 12.5px; }
.oa-inapp-btns .oa-chrome { display: inline-flex; align-items: center; border-radius: 6px; background: #1a73e8; color: #fff !important; text-decoration: none; font-weight: 600; }

/* the name window (sign-up with Google / Facebook): the sign-up window's look */
.oauth-card #oauth-error { margin: 0; }
.oauth-card #oauth-error:empty { display: none; }
.oa-who { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(70, 195, 91, 0.10); font-size: 13px; line-height: 1.35; }
.oa-who:empty { display: none; }
.oa-who b { display: block; }
.oa-who small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.oa-who-ic { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid #dadce0; }
.oa-who-ic.oa-facebook { background: #1877f2; border-color: #1468d8; }
.oa-who-ic .oa-mark { width: 16px; height: 16px; }

/* ---- the RO look (the client's 280 wide login window) ---- */
/* (the RO login window is a column ordered by theme-ro.css: the buttons right under the form, before its message / hint) */
.theme-ro #screen-login .login-card > .oa-box { order: 1; }
.theme-ro #screen-login .oa-box { margin: 0; padding: 8px 12px 9px; border-top: 1px solid #e3e6ec; background: #fff; }
.theme-ro .oa-or { margin: 0 0 7px; color: #8a90a0; font: 11px var(--ro-font); }
.theme-ro .oa-btns { grid-template-columns: 1fr; gap: 6px; }
.theme-ro #screen-login .oa-btn { min-height: 28px; height: 28px; padding: 0 10px; gap: 8px; border-radius: 3px; font: bold 12px/26px var(--ro-font); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); }
.theme-ro #screen-login .oa-btn .oa-mark { width: 16px; height: 16px; }
.theme-ro #screen-login .oa-btn.oa-google { background: linear-gradient(#ffffff, #f3f5f9); border-color: #b7bfcf; color: #303845; }
.theme-ro #screen-login .oa-btn.oa-google:hover:not(:disabled) { background: linear-gradient(#ffffff, #e6eefc); border-color: #8ea3cf; }
.theme-ro #screen-login .oa-btn.oa-facebook { background: linear-gradient(#2d86f7, #1877f2 55%, #1468d8); border-color: #1158c0; color: #fff; }
.theme-ro #screen-login .oa-btn.oa-facebook:hover:not(:disabled) { background: linear-gradient(#3f92f9, #1f7ff5 55%, #166fe5); }
.theme-ro .oa-last { top: -7px; font-size: 9.5px; line-height: 14px; }
.theme-ro .oa-inapp { font: 11px/1.45 var(--ro-font); color: #3a3000; }
.theme-ro .oa-inapp small { color: #6b6250; font-size: 10.5px; }
.theme-ro .oa-inapp-btns button { height: 22px; min-height: 22px; font-size: 11px; line-height: 20px; }
.theme-ro .oa-inapp-btns .oa-chrome { min-height: 22px; height: 22px; padding: 0 9px; border-radius: 3px; font: bold 11px/22px var(--ro-font); }
/* the sign-up window: the buttons under its button strip */
.theme-ro .reg-card .oa-box { margin: 0; padding: 8px 12px 9px; border-top: 1px solid #e3e6ec; background: #fff; }
/* the name window */
.theme-ro .oauth-card #oauth-error { font-size: 11px; color: #c62828; }
.theme-ro .oa-who { padding: 6px 8px; border-color: #b9dcc0; border-radius: 4px; background: #f0faf2; font: 11px/1.4 var(--ro-font); color: #1d2a20; }
.theme-ro .oa-who small { color: #4b5a50; }
.theme-ro .oa-who-ic { width: 24px; height: 24px; }
.theme-ro .oa-who-ic .oa-mark { width: 14px; height: 14px; }
.theme-ro .oauth-card .reg-rule { line-height: 1.4; }
/* with the client's own login window picture (280 x 120, uiskin.js): the buttons in their own small window under it */
/* (under the line of the login's status, theme-ro.css: 126 px from the window's top) */
html.ro-login-win .theme-ro #screen-login .login-card > .oa-box { position: absolute; left: 0; right: 0; top: calc(100% + 26px); padding: 7px 12px 9px;
	border: 1px solid #a3abbd; border-radius: 4px; background: rgba(255, 255, 255, 0.96); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28); }
/* (the window keeps the room under it - its centring counts the box; with the invite of a friend's link under the window
   too - theme-ro.css .login-ref at 148 px, two lines - the box under the invite) */
html.ro-login-win .theme-ro #screen-login .login-card.oa-has { margin-bottom: 132px; }
html.ro-login-win .theme-ro #screen-login .login-card.oa-has.has-ref { margin-bottom: 214px; }
html.ro-login-win .theme-ro #screen-login .login-card.has-ref > .oa-box { top: calc(100% + 106px); }

/* a phone turned sideways: "ติดตั้งเป็นแอป" (theme-ro.css, low in the middle) to the corner - the taller login window is in the
   middle */
@media (max-height: 500px) and (orientation: landscape) {
	#screen-login .login-tools { left: max(12px, env(safe-area-inset-left)); transform: none; bottom: max(12px, env(safe-area-inset-bottom)); flex-direction: column; align-items: flex-start; gap: 6px; }
	#screen-login .app-install, #screen-login .app-install:hover:not(:disabled) { padding: 6px 14px; font-size: 13px; }
	#screen-login .app-clear, #screen-login .app-clear:hover:not(:disabled) { padding: 5px 12px; font-size: 12px; }
	#screen-login .app-guide { left: auto; right: max(12px, env(safe-area-inset-right)); transform: none; bottom: max(12px, env(safe-area-inset-bottom)); max-height: calc(100vh - 24px); overflow: auto; }
}

/* ---- the pastel look ---- */
.theme-pastel .oa-or { color: var(--plum, #7a6a8c); }
.theme-pastel #screen-login .oa-btn { border-radius: 12px; font-family: var(--round, inherit); }

/* ---- the game's window บัญชี Google / Facebook ---- */
.win-oauth .win-body { padding: 8px 10px 10px; }
.oa-win { display: flex; flex-direction: column; gap: 8px; }
.oa-intro { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.oa-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.oa-row.on { border-color: rgba(70, 195, 91, 0.55); background: rgba(70, 195, 91, 0.08); }
.oa-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid #dadce0; }
.oa-ic.oa-facebook { background: #1877f2; border-color: #1468d8; }
.oa-ic .oa-mark { width: 18px; height: 18px; }
.oa-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.oa-t b { font-size: 14px; }
.oa-t small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.oa-row.on .oa-t small { color: var(--ok); }
#windows .win-oauth .oa-act { flex: none; }
/* Google once linked: ผูกถาวร, no button (Noh 2026-11-14) */
.oa-perm { flex: none; padding: 2px 9px; border-radius: 10px; border: 1px solid rgba(46, 160, 90, 0.45); background: rgba(46, 160, 90, 0.1); color: var(--ok); font-size: 12px; font-weight: 600; white-space: nowrap; }
html.mhud .oa-row .oa-perm { margin-left: 42px; }
#windows .win-oauth .oa-act[data-a="oalink"][data-p="facebook"] { background: #1877f2; border-color: #1468d8; color: #fff; }
#windows .win-oauth .oa-act[data-a="oalink"][data-p="google"] { background: #fff; border-color: #c4ccda; color: #303845; }
.oa-inwin { margin: -2px 0 0; }
.oa-note { margin: 0; padding: 6px 10px; border-radius: 6px; background: rgba(230, 180, 34, 0.15); font-size: 12.5px; }
.oa-pass { margin: 2px 0 0; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; }
.oa-pass p { margin: 0 0 6px; }
.oa-pass.ok { border: 1px solid var(--line); }
.oa-pass.warn { border: 1px solid rgba(230, 180, 34, 0.6); background: rgba(230, 180, 34, 0.10); }
.oa-pw { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.oa-pw input { min-width: 0; min-height: 30px; }
.oa-priv { font-size: 12px; color: var(--muted); }
/* เปลี่ยนรหัสผ่าน (0.8.373) */
.oa-cp { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; line-height: 1.45; }
.oa-cp.warn { border-color: rgba(230, 180, 34, 0.6); background: rgba(230, 180, 34, 0.10); }
.oa-cp-h { font-size: 13.5px; }
.oa-cp-note { margin: 0; }
.oa-cpf { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.oa-cpf input { min-width: 0; min-height: 30px; }
.oa-cpf .oa-cp-old { grid-column: 1 / -1; }
.oa-cpf .oa-cp-go { grid-column: 1 / -1; justify-self: end; min-width: 132px; }
.oa-cp-msg { margin: 0; padding: 5px 8px; border-radius: 6px; font-size: 12.5px; }
.oa-cp-msg.ok { color: var(--ok, #1e7a37); background: rgba(70, 195, 91, 0.12); border: 1px solid rgba(70, 195, 91, 0.45); }
.oa-cp-msg.bad { color: #c0392b; background: rgba(231, 76, 60, 0.10); border: 1px solid rgba(231, 76, 60, 0.45); }
.oa-cp-tip { color: var(--muted); font-size: 11.5px; }
html.mhud .oa-cpf { grid-template-columns: 1fr; }
html.mhud .oa-cpf .oa-cp-go { justify-self: stretch; }
.oa-optrow button.oa-optbtn { width: 100%; text-align: left; }
html.mhud .oa-pw { grid-template-columns: 1fr; }
html.mhud .oa-row { flex-wrap: wrap; }
html.mhud .oa-row .oa-act { margin-left: 42px; }
@media (max-width: 480px) { .oa-pw, .oa-cpf { grid-template-columns: 1fr; } .oa-cpf .oa-cp-go { justify-self: stretch; } }
/* the RO look */
.theme-ro .win-oauth .win-body { background: #fff; font: 12px var(--ro-font); color: #222a3a; }
.theme-ro .oa-intro { color: #5f6880; font-size: 11.5px; }
.theme-ro .oa-row { padding: 6px 8px; border-color: #c8cfdf; border-radius: 4px; background: #f6f8fc; }
.theme-ro .oa-row.on { border-color: #9bd3a7; background: #effaf1; }
.theme-ro .oa-t b { font-size: 12px; }
.theme-ro .oa-t small { font-size: 11px; color: #5f6880; }
.theme-ro .oa-row.on .oa-t small { color: #1e7a37; }
.theme-ro .oa-ic { width: 26px; height: 26px; }
.theme-ro .oa-ic .oa-mark { width: 15px; height: 15px; }
html.ro-skin .theme-ro #windows .win-oauth .oa-act[data-a="oalink"][data-p="facebook"] { background: linear-gradient(#2d86f7, #1877f2 55%, #1468d8); border: 1px solid #1158c0; border-radius: 3px; color: #fff; }
html.ro-skin .theme-ro #windows .win-oauth .oa-act[data-a="oalink"][data-p="google"] { background: linear-gradient(#ffffff, #f3f5f9); border: 1px solid #b7bfcf; border-radius: 3px; color: #303845; }
.theme-ro #windows .win-oauth .oa-act[data-a="oalink"][data-p="facebook"] { background: linear-gradient(#2d86f7, #1877f2 55%, #1468d8); border-color: #1158c0; color: #fff; }
.theme-ro .oa-pass { font-size: 11.5px; border-radius: 4px; }
.theme-ro .oa-pass.ok { border-color: #c8cfdf; background: #f6f8fc; }
.theme-ro .oa-pass.warn { border-color: #e6c77a; background: #fffaf0; }
.theme-ro .oa-pw input, .theme-ro .oa-cpf input { min-height: 20px; height: 20px; font-size: 12px; background: #f1f1f1; border: 1px solid #c4c4c4; }
.theme-ro .oa-cp { font-size: 11.5px; border-radius: 4px; border-color: #c8cfdf; background: #f6f8fc; }
.theme-ro .oa-cp.warn { border-color: #e6c77a; background: #fffaf0; }
.theme-ro .oa-cp-h { font-size: 12px; color: #1f3c88; }
.theme-ro .oa-cp-msg { font-size: 11.5px; border-radius: 3px; }
.theme-ro .oa-cp-msg.ok { color: #1e7a37; background: #effaf1; border-color: #9bd3a7; }
.theme-ro .oa-cp-msg.bad { color: #b0302a; background: #fff3f3; border-color: #f0b4b4; }
.theme-ro .oa-cp-tip { color: #5f6880; font-size: 11px; }
.theme-ro .oa-note { font-size: 11.5px; background: #fff6dc; }
.theme-ro .oa-priv { color: #2a4aa0; font-size: 11px; }
