/* Styles are limited to the Wellbeing home-screen add-on. */
#wbhs-install-root,
#wbhs-install-root *,
.wbhs-menu-card,
.wbhs-menu-card *,
.wbhs-login-card,
.wbhs-login-card * { box-sizing: border-box; }

#wbhs-install-root [hidden],
.wbhs-installed .wbhs-install-promotion,
.wbhs-standalone #tlt3rds-tlt-bridge { display: none !important; }

#tlt-wb-header .wb-brand-mark.wbhs-brand-mark {
  display: block !important;
  flex: 0 0 64px !important;
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
  border: 1px solid #796143 !important;
  border-radius: 10px !important;
  background: #090909 !important;
  overflow: hidden;
}

.wbhs-brand-link { display: block; width: 100%; height: 100%; }
#tlt-wb-header .wbhs-brand-image { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }

#lui-tools .wb-menu-grid .wbhs-menu-card {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #796143;
  border-radius: 12px;
  background: linear-gradient(120deg, #22180f, #101720);
}

.wbhs-menu-art { display: block; flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; object-fit: contain; }
.wbhs-menu-copy, .wbhs-login-copy { min-width: 0; }
#lui-tools .wbhs-menu-card h3 { margin: 0 0 4px; color: #f2e3c9; font: 650 15px/1.35 system-ui, sans-serif; letter-spacing: 0; text-transform: none; }
#lui-tools .wbhs-menu-card p { margin: 0 0 10px; color: #c6bdaf; font: 400 13px/1.5 system-ui, sans-serif; }

#lui-tools .wbhs-download-button,
.wbhs-login-card .wbhs-download-button,
#wbhs-native-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  width: auto;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid #d6b579;
  border-radius: 8px;
  color: #19150e;
  background: #e4c695;
  font: 700 14px/1.4 system-ui, sans-serif;
  white-space: normal;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

#lui-tools .wbhs-download-button:hover,
.wbhs-login-card .wbhs-download-button:hover,
#wbhs-native-install:hover { background: #f5ddaf; color: #19150e; }
#wbhs-native-install:disabled { opacity: .65; cursor: wait; }

.wbhs-login-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: min(100%, 620px);
  min-width: 0;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid #796143;
  border-radius: 14px;
  background: #10151c;
  color: #f2e3c9;
  font: 400 14px/1.5 system-ui, sans-serif;
}

.wbhs-login-home { display: block; flex: 0 0 80px; width: 80px; border-radius: 10px; overflow: hidden; }
.wbhs-login-art { display: block; width: 80px; height: 80px; object-fit: contain; }
.wbhs-login-copy strong { display: block; color: #f2e3c9; font-size: 18px; }
.wbhs-login-copy p { margin: 4px 0 12px; color: #c6bdaf; }

#wbhs-install-dialog {
  position: fixed;
  width: min(440px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 26px;
  border: 1px solid #95754c;
  border-radius: 18px;
  background: #10151c;
  color: #efe3cf;
  box-shadow: 0 24px 90px #000b;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  font: 400 15px/1.55 system-ui, -apple-system, sans-serif;
  text-align: left;
  overflow-wrap: break-word;
}

#wbhs-install-dialog:not([open]) { display: none; }
#wbhs-install-dialog::backdrop { background: rgb(0 0 0 / .78); }
.wbhs-dialog-open { overflow: hidden; }
#wbhs-install-root.wbhs-fallback-open { position: fixed; z-index: 2147483646; inset: 0; background: rgb(0 0 0 / .78); }
.wbhs-fallback-open #wbhs-install-dialog { z-index: 2147483647; top: 50%; left: 50%; margin: 0; transform: translate(-50%, -50%); }

#wbhs-install-dialog [data-wbhs-close] {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #10151ceb;
  color: #f2e3c9;
  font: 500 16px/1 system-ui, sans-serif;
  cursor: pointer;
}

#wbhs-install-dialog [data-wbhs-close]:hover { background: #2c2924; }
#wbhs-art { display: block; width: min(180px, 65%); height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto 18px; border-radius: 14px; background: #090909; }
#wbhs-title { margin: 0 0 9px; color: #f2e3c9; font: 700 24px/1.2 system-ui, sans-serif; letter-spacing: -.02em; text-align: center; }
#wbhs-message { margin: 0 0 18px; color: #c9c1b6; font: inherit; text-align: center; }
#wbhs-instructions { margin: 0 0 20px; }
#wbhs-instructions .wbhs-steps { margin: 0; padding: 0 0 0 24px; color: #e7dfd3; }
#wbhs-instructions .wbhs-steps li { padding: 0 0 0 5px; margin: 0 0 12px; font: inherit; }
#wbhs-instructions .wbhs-steps li::marker { color: #d8b782; font-weight: 700; }
#wbhs-native-install { width: 100%; }
#wbhs-status { margin: 12px 0; color: #dbc29b; font: 400 13px/1.5 system-ui, sans-serif; }
#wbhs-status:empty { display: none; }
#wbhs-install-root .wbhs-signin-note { margin: 12px 0 0; color: #a8a49e; font: 400 12px/1.5 system-ui, sans-serif; text-align: center; }
#wbhs-open-link { display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 10px; padding: 9px 12px; color: #eee1cd; font: 600 14px/1.4 system-ui, sans-serif; text-decoration: underline; text-underline-offset: 3px; }

#wbhs-install-root :focus-visible,
.wbhs-login-card :focus-visible,
.wbhs-menu-card :focus-visible,
.wbhs-brand-mark :focus-visible { outline: 3px solid #f3dca8; outline-offset: 3px; }

@media (max-width: 430px) {
  #tlt-wb-header .wb-brand-mark.wbhs-brand-mark { flex-basis: 56px !important; width: 56px !important; height: 56px !important; }
  #wbhs-install-dialog { padding: 22px 18px 16px; }
  #wbhs-art { width: 132px; margin-bottom: 14px; }
  #wbhs-title { font-size: 22px; }
  .wbhs-login-card { gap: 12px; padding: 16px; }
  .wbhs-login-home { flex-basis: 68px; width: 68px; }
  .wbhs-login-art { width: 68px; height: 68px; }
  .wbhs-login-copy strong { font-size: 17px; }
  #lui-tools .wb-menu-grid .wbhs-menu-card { gap: 12px; padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #wbhs-install-root *, .wbhs-menu-card *, .wbhs-login-card * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
