/* Public layout baseline. site.html.erb links this and Tailwind as
   render-blocking stylesheets, so the first paint has both. Unlayered rules
   beat Tailwind's layers. application.css stubs this file so the same rules
   do not land on the signed-in app. */

html {
  scroll-behavior: smooth;
}

/* Clears the fixed cookie banner. --cookie-banner-height is 0 once it is dismissed. */
.booking-page {
  padding-bottom: calc(var(--cookie-banner-height, 0px) + 2rem);
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: hsl(var(--background, 0 0% 100%));
  color: hsl(var(--foreground, 222 47% 11%));
}

.h-full {
  height: 100%;
}

/* Declare Tailwind's layer order so unlayered rules in this file stay above them. */
@layer properties, theme, base, components, utilities;

.art {
  display: block;
  max-width: 100%;
  height: auto;
  min-width: 0;
}

.art-doctor {
  width: 100%;
  max-width: 36rem;
  aspect-ratio: 1086.13 / 782.67;
}

.art-medicine {
  width: 100%;
  max-width: 42rem;
  aspect-ratio: 1105.04 / 782.74;
}

.art-frame {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 11rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.art-slot {
  display: block;
  width: auto;
  max-width: 100%;
  height: 11rem;
}

.art-care {
  aspect-ratio: 960.001 / 690.941;
}

/* Open times follow the theme. Selected times stay #175CD3 in the file. */
.art-care .care-open {
  fill: #e4e4e7;
}

.dark .art-care .care-open {
  fill: #3f3f46;
}

/* Light top, dark legs on a white card. Both lift on a dark card so neither disappears. */
.art-care .care-hoodie {
  fill: #d9cbb8;
}

.dark .art-care .care-hoodie {
  fill: #f6f0e6;
}

.art-care .care-pants {
  fill: #090814;
}

.dark .art-care .care-pants {
  fill: #c4c4ca;
}

/* Hair and shoes stay darker than the pants, and lift off a dark card. */
.art-care .care-ink {
  fill: #090814;
}

.dark .art-care .care-ink {
  fill: #56566a;
}

.art-care .care-frame {
  fill: #3f3d56;
}

.dark .art-care .care-frame {
  fill: #7a798c;
}

.art-care .care-floor {
  fill: #090814;
  fill-opacity: 0.2;
}

.dark .art-care .care-floor {
  fill: #c8c8d0;
  fill-opacity: 0.45;
}

/* Coat buttons are darker than the coat in both modes. Hair, trousers, and shoes lift together on a dark card. */
.art-practice .practice-button {
  fill: #767684;
}

.art-practice .practice-silhouette {
  fill: #2e2e41;
}

.dark .art-practice .practice-silhouette {
  fill: #6b6b7c;
}

.art-practice .practice-floor {
  fill: #3f3c57;
}

.dark .art-practice .practice-floor {
  fill: #8e8e9a;
}

.art-practice {
  aspect-ratio: 692.68042 / 596.95062;
}

.headline-scribble {
  position: relative;
  white-space: nowrap;
}

.headline-scribble > svg {
  position: absolute;
  left: 0;
  top: 78%;
  width: 100%;
  height: 0.72em;
}

.headline-scribble > span {
  position: relative;
}

.media-frame {
  position: relative;
  height: var(--media-h, 6rem);
}

.media-frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-frame {
  width: var(--avatar, 4rem);
  height: var(--avatar, 4rem);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Incoming iOS message: gray bubble, tail at the bottom left. */
.sms-phone {
  width: 100%;
  max-width: 30rem;
  margin-inline: auto;
}
.sms-time {
  margin: 0 0 0.4rem;
  color: #8e8e93;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.sms-in {
  position: relative;
  display: inline-block;
  max-width: 86%;
  margin: 0;
  padding: 8px 12px;
  background: #e9e9eb;
  color: #000;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

@media (max-width: 480px) {
  .sms-in {
    max-width: 100%;
  }
}

.sms-in::before,
.sms-in::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 16px;
}

.sms-in::before {
  z-index: 0;
  left: -6px;
  width: 14px;
  background: #e9e9eb;
  border-bottom-right-radius: 12px;
}

.sms-in::after {
  z-index: 1;
  left: -10px;
  width: 10px;
  background: hsl(var(--card));
  border-bottom-right-radius: 10px;
}

.sms-link {
  color: #007aff;
}

.dark .sms-in,
.dark .sms-in::before {
  background: #3a3a3c;
  color: #fff;
}

.dark .sms-link {
  color: #0a84ff;
}

/* Names in the system story. Patient blue, and the same orange as the Clinic label.
   The name stays on the sentence baseline. The face is centered on that text. */
.actor {
  display: inline;
  white-space: nowrap;
}

.actor-face {
  display: inline-block;
  margin-inline-end: 0.35rem;
  line-height: 0;
  vertical-align: text-bottom;
}

.actor-face img,
.actor-face > span {
  display: inline-block;
  vertical-align: top;
}

.name-patient {
  color: #175cd3;
}

.name-clinic {
  color: #fd853a;
}

.dark .name-patient {
  color: #2e90fa;
}

/* Date above the clock while the rail is 4rem. A wide window has margin
   to spare, so they share one line and the column grows left. */
.rail-clock {
  font-size: 11px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.rail-date,
.rail-time {
  display: block;
}

@media (min-width: 90rem) {
  #day {
    margin-left: -9.25rem;
  }

  #day .day-rail {
    grid-template-columns: 9.25rem 1px minmax(0, 1fr);
  }

  .rail-clock {
    width: 9.25rem;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    padding-right: 0.75rem;
  }

  .rail-date,
  .rail-time {
    display: inline;
  }

  .rail-date::after {
    content: " · ";
  }
}

@media (min-width: 40rem) {
  .art-frame,
  .art-slot {
    height: 13rem;
  }
}

@layer base {
  *,
  ::before,
  ::after {
    box-sizing: border-box;
  }

  /* max-width only. height:auto here would override the height attribute
     on images that have no size utility. */
  img,
  video {
    max-width: 100%;
  }

  /* Fallback for a widthless icon with no size utility. Stay in this layer
     so size-* still wins. */
  :where(svg:not([width])) {
    width: 1rem;
    height: 1rem;
  }
}
