/* Flow Demo Hospital: the Flow Technology bar and loading screen shared by
   every app page, plus base tokens for the hub page. Brand: cream background,
   royal blue main colour, marigold only as a highlighter. */
:root {
  --cream: #FBF6EC;
  --blue: #2233A8;
  --blue-deep: #18257E;
  --sun: #FFC93C;
  --ink: #141833;
  --muted: #5B5F7A;
  --line: #141833;
  --bar-h: 48px;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --font-logo: 'Shrikhand', 'Bricolage Grotesque', cursive;
}

html, body.flow-app {
  height: 100%;
  margin: 0;
}

body.flow-app {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  overflow: hidden;
}

/* ---- The Flow bar ---------------------------------------------------- */
.flow-bar {
  flex: 0 0 var(--bar-h);
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 0 16px;
  background: var(--blue);
  color: var(--cream);
  font: 500 14px/1 var(--font-body);
  border-bottom: 2px solid var(--line);
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.flow-bar a {
  color: inherit;
  text-decoration: none;
}

.flow-logo {
  font: 400 22px/1 var(--font-logo);
  letter-spacing: 0.2px;
  color: var(--cream);
  white-space: nowrap;
  padding-bottom: 3px;
}

.flow-place {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.flow-place .hospital {
  font: 700 15px/1 var(--font-display);
}

.flow-place .app {
  background: var(--sun);
  color: var(--ink);
  font: 700 12px/1 var(--font-body);
  padding: 4px 8px;
  border-radius: 999px;
}

.flow-place .who {
  color: rgba(251, 246, 236, 0.75);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-spacer { flex: 1; }

.flow-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.flow-btn {
  display: inline-flex;
  align-items: center;
  white-space: pre;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid var(--cream);
  background: transparent;
  color: var(--cream);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
}

.flow-btn:hover { background: rgba(251, 246, 236, 0.12); }

.flow-btn.solid {
  background: var(--cream);
  color: var(--blue);
}

.flow-btn.solid:hover { background: #fff; }

.flow-btn:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 2px;
}

/* Reset confirmation, shown under the bar. */
.flow-confirm {
  position: absolute;
  top: calc(var(--bar-h) + 6px);
  right: 12px;
  width: 280px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--line);
  padding: 14px 16px;
  font: 400 14px/1.45 var(--font-body);
  display: none;
}

.flow-confirm.open { display: block; }
.flow-confirm p { margin: 0 0 12px; }
.flow-confirm .row { display: flex; gap: 8px; justify-content: flex-end; }
.flow-confirm button {
  height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 600 13px/1 var(--font-body); border: 2px solid var(--line);
  background: #fff; color: var(--ink);
}
.flow-confirm button.danger { background: var(--blue); color: var(--cream); border-color: var(--blue); }

/* ---- Where Flutter renders ------------------------------------------- */
#flutter-host {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
}

/* ---- Loading screen --------------------------------------------------- */
#flow-splash {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  transition: opacity 0.35s ease;
}

#flow-splash.gone { opacity: 0; pointer-events: none; }

#flow-splash .mark { width: 72px; height: 72px; }

#flow-splash h1 {
  margin: 0;
  font: 800 26px/1.1 var(--font-display);
  color: var(--blue);
  text-align: center;
}

#flow-splash .sub {
  font-size: 15px;
  color: var(--muted);
}

#flow-splash .track {
  width: 200px;
  height: 6px;
  border-radius: 999px;
  border: 2px solid var(--line);
  overflow: hidden;
  background: #fff;
}

#flow-splash .track span {
  display: block;
  height: 100%;
  width: 35%;
  background: var(--blue);
  border-radius: 999px;
  animation: flow-load 1.2s ease-in-out infinite;
}

@keyframes flow-load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}

#flow-splash .credit {
  position: absolute;
  bottom: 22px;
  font-size: 13px;
  color: var(--muted);
}

#flow-splash .credit strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  #flow-splash .track span { animation: none; width: 100%; }
}

/* ---- Small screens ---------------------------------------------------- */
@media (max-width: 760px) {
  .flow-place .who, .flow-btn .long { display: none; }
}

@media (max-width: 480px) {
  .flow-bar { gap: 8px; padding: 0 8px 0 12px; }
  .flow-place .hospital { display: none; }
  .flow-btn { padding: 0 10px; }
  .flow-btn.cta { display: none; }
}
