/*
 * Page and view styles for the Just Works application shell.
 *
 * Tokens live in tokens.css and shared components (buttons, fields, cards,
 * chips, brand mark, typography) live in components.css. Both load before
 * this file. Add only app-specific layout here.
 */

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--jw-bg);
  color: var(--jw-text-primary);
  font: 16px/var(--jw-leading-normal) var(--jw-font-sans);
  letter-spacing: 0;
  /* The bar is fixed, so anything scrolled to must stop below it: anchors,
     focus moves, and scroll-into-view all read this. */
  scroll-padding-top: calc(var(--jw-topbar-height) + var(--jw-space-4));
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--jw-bg-gradient);
  background-attachment: fixed;
}

body.creating { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; letter-spacing: 0; }

main > section { display: none; }
body.mode-home #homeView,
body.mode-nsite #nsiteView,
body.mode-cms #crmView,
body.mode-target #targetView { display: block; }

.owner-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.owner-login-card {
  display: grid;
  gap: var(--jw-space-3);
  padding: var(--jw-space-4);
  border: 1px solid var(--jw-line);
  border-radius: var(--jw-radius-md);
  background: var(--jw-surface-sunken);
}

.owner-login-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 920;
  text-transform: uppercase;
}

.owner-login-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* The ring icon control from the design system, one step smaller. */
.help-button {
  --jw-ring-button-size: 32px;
  font-size: 0.9rem;
}

.owner-help-box {
  display: none;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 690;
  line-height: 1.45;
  text-transform: none;
}

.owner-help-box.show {
  display: grid;
}

.owner-help-box b {
  font-weight: 920;
}

.owner-help-box span {
  color: var(--muted);
}

.owner-login-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.35;
  text-transform: none;
}

/* The create dialog's progress and result internals live with the rest of
   the create flow, in create.css. */


.secret {
  padding: 12px;
  border-radius: var(--jw-radius-md);
  background: var(--jw-surface-sunken);
  overflow-wrap: anywhere;
  font-weight: 860;
  color: var(--ink);
}

.link-list {
  display: grid;
  gap: 8px;
}

.link-list a {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--jw-line);
  border-radius: var(--jw-radius-md);
  background: var(--jw-surface-sunken);
}

.panel .link-list a {
  border-color: var(--line);
  background: rgba(18, 32, 29, 0.035);
}

.link-title {
  color: inherit;
  font-size: 0.77rem;
  font-weight: 930;
  text-transform: uppercase;
}

.link-url {
  overflow: hidden;
  color: inherit;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.screen {
  position: relative;
  min-height: 698px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--card);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60% 100%);
  opacity: 0;
  transform: translateX(-70%);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: var(--jw-radius-pill);
  background: rgba(255, 255, 255, 0.88);
  color: #111;
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 850;
}

.avatar {
  width: 86px;
  height: 86px;
  margin-top: 78px;
  display: grid;
  place-items: center;
  border-radius: var(--jw-radius-pill);
  background:
    linear-gradient(135deg, #ffcc4d, #ff5d5d, #2764ff, #20c5a8);
  color: #fff;
  font-size: 2rem;
  font-weight: 950;
  border: 4px solid #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.story {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  color: #555;
  font-size: 0.7rem;
  font-weight: 750;
  text-align: center;
}

.story span:first-child {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--jw-radius-pill);
  background: #fff;
  font-size: 1.2rem;
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

/* `.experience-button` carries no styling of its own: it is only the hook
   motion.js looks for to attach the press behaviour. It renders as a
   primary button via components.css. */
