/* GensApps 계정 로그인 단추 — 세 데모 앱 공통 (gensapps-homepage#76).
   표준: auth_server docs/6.operations/16.OIDC_SETUP.md 「로그인 버튼 표준」.
   이 앱들에는 Google 로그인 단추가 없어 Google 표준 단추 크기(높이 40px · 글자 14px · 모서리 4px)에 맞췄다.
   외곽선 단추다. 글자색은 앱이 `--gensapps-login-fg` 로 정한다(안 정하면 둘레 글자색을 물려받는다 —
   오류 문구 안에 놓이면 빨갛게 되므로 앱마다 본문 글자색을 넣어 둔다). */
.gensapps-login {
  --gensapps-line: rgba(255, 255, 255, .32);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--gensapps-line);
  border-radius: 4px;
  background: transparent;
  color: var(--gensapps-login-fg, inherit);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.gensapps-login:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .5); }
.gensapps-login:focus-visible { outline: 2px solid #8b9cf6; outline-offset: 2px; }
.gensapps-login__icon { display: inline-flex; width: 20px; height: 20px; }
.gensapps-login__icon svg { display: block; }

/* 누른 뒤 — 스피너가 아이콘 자리를 대신한다. 문구는 바꾸지 않는다(표준) */
.gensapps-spinner { display: none; }
.is-busy .gensapps-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: gensapps-spin .7s linear infinite;
}
.gensapps-login.is-busy .gensapps-login__icon { display: none; }
.is-busy { cursor: progress; opacity: .8; }
@keyframes gensapps-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-busy .gensapps-spinner { animation-duration: 2s; } }

/* 화면에는 안 보이고 화면 낭독기만 읽는 글 */
.gensapps-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 머리글 오른쪽 계정 자리 */
.gensapps-account { display: inline-flex; align-items: center; gap: 12px; min-width: 0; font-size: 14px; }
.gensapps-account__name {
  max-width: 14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.gensapps-account__logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  opacity: .75;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.gensapps-account__logout:hover { opacity: 1; }
.gensapps-account__logout .gensapps-spinner { width: 12px; height: 12px; margin: 0; }

/* 좁은 화면 — 이름은 줄여 보이고 단추는 꺾지 않는다 */
@media (max-width: 480px) {
  .gensapps-account { gap: 8px; }
  .gensapps-account__name { max-width: 7em; }
  .gensapps-login { padding: 0 12px; gap: 8px; }
}

/* 머리글 오른쪽 묶음(앱의 메뉴 + 계정 자리). 좁으면 다음 줄로 내려간다 */
.gensapps-header-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}

/* 안내 문구 아래에 다는 로그인 단추 줄(GensAppsLogin.notice) */
.gensapps-login-row { margin-top: 10px; }
