/* IHS-specific styles. Everything shared lives in app.css, copied from the
   support console -- keep this file small so app.css can be refreshed by
   overwriting it.

   The sidebar nav is deliberately <a> elements, not <button>. app.css styles
   `.nav a`; a <button> there inherits the global button base (solid background,
   border, `transition: filter`, `button:hover { filter: brightness() }`), and
   fighting that with overrides made hovering flicker. Same element, same rules,
   nothing to fight. */

.hide { display: none !important; }

/* The API-docs line under the log-in button. Centred under the form, with room
   above it so it reads as a footnote rather than part of the form. */
  margin: 1.25rem 0 0;
  text-align: center;
}

.field { margin-bottom: 0.6rem; }
.field label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.field input, .field select { width: 100%; }

.grid-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.6rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
td { overflow: hidden; text-overflow: ellipsis; max-width: 220px; white-space: nowrap; }
tbody tr.clickable:hover { background: var(--surface-2); cursor: pointer; }

.rowline { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
/* app.css gives every text input width:100%, which is right for stacked .field
   blocks but wrong inline: a 100%-wide input in a flex row pushes the button
   next to it onto its own line. Inline inputs size to their flex basis instead. */
.rowline input[type="text"],
.rowline input[type="email"],
.rowline input[type="password"] { width: auto; }
.rowline input.grow { flex: 1; min-width: 220px; }
/* Pagination under the vessel results. Every `td` carries a border-bottom, so
   without this the buttons sit flush on the last row's rule with no gap at all.
   `.rowline` sets no margin of its own because it is mostly used for toolbars
   that sit directly under a heading. */
#pager { margin-top: 1rem; }

.muted { color: var(--text-muted); font-size: 0.85rem; }
.danger-text { color: var(--danger); }

/* The one-time API key. user-select:all so a single click selects the whole
   value -- it can never be shown again, so a half-copied key is a lost key. */
code.secret {
  display: block; margin-top: 0.4rem; padding: 0.5rem 0.6rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); word-break: break-all; user-select: all;
  font-size: 0.85rem;
}

/* API docs: readable prose column, and it is served WITHOUT a login. */
.docs { max-width: 90ch; }
.docs pre {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
  overflow-x: auto; font-size: 0.85rem; line-height: 1.45;
}
.docs code:not(.secret) { background: var(--surface-2); padding: 0.1rem 0.3rem; border-radius: 4px; font-size: 0.88em; }
.docs table { margin: 0.6rem 0 1.2rem; }
.docs td { white-space: normal; max-width: none; }
.method { font-weight: 700; font-size: 0.8rem; padding: 0.1rem 0.4rem; border-radius: 4px; }
.method.get { background: var(--primary-soft); color: var(--primary); }
.method.put { background: var(--warn-soft); color: var(--warn); }

/* Action log: the path column. Longest field on the row and the least fixed, so
   cap it — without this one long path pushes Outcome off the side, since
   `.table-wrap td` is nowrap. */
.table-wrap td.act { max-width: 26rem; overflow: hidden; text-overflow: ellipsis; }

/* ---- login: Google ---- */
/* The "or" divider and the notes under the card. Same rules as the support
   console's app.css, so the three sign-in pages match by construction rather
   than by eye. */
.login-or {
  display: flex; align-items: center; gap: 0.7rem;
  margin: 1.1rem 0 0.9rem; color: var(--text-muted); font-size: 0.82rem;
}
.login-or::before, .login-or::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.login-aside {
  margin: 1.1rem 0 0; padding-top: 0.9rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-muted); text-align: center;
}

/* ---- Sign in with Google -------------------------------------------------
   One definition, identical in all three Bunkerchain consoles. Follows Google's
   own button guidance rather than each console's theme, because that is what
   makes it recognisable: the 4-colour "G" is never recoloured or redrawn, the
   surface is Google's white (or their #131314 in dark mode), and the label stays
   "Sign in with Google".

   The mark is INLINE SVG, not an <img> off Google's CDN: these consoles load
   nothing off-origin, which keeps the CSP story simple and means the button
   still renders if that CDN is unreachable -- on a login page, of all places. */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; box-sizing: border-box; min-height: 40px;
  padding: 0 12px;
  border: 1px solid #747775; border-radius: 4px;
  background: #fff; color: #1f1f1f;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .25px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.btn-google:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgba(60,64,67,.30), 0 1px 3px 1px rgba(60,64,67,.15); }
.btn-google:active { background: #f1f3f4; }
.btn-google:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
/* Fixed so a narrow card cannot squash the mark out of its proportions. */
.btn-google__icon { flex: 0 0 18px; width: 18px; height: 18px; display: block; }

@media (prefers-color-scheme: dark) {
  .btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
  .btn-google:hover { background: #1e1f20; box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15); }
  .btn-google:active { background: #282a2c; }
  /* The mark itself never changes: recolouring it is the one thing Google's
     guidelines rule out, and a monochrome "G" reads as a different product. */
}
