/*
 * Public pages of Library Management System (config/registry.php → public_styles; every page of the public layout):
 *  1. the home page (resources/views/pages/home.php, classes .lib-home-*, the CSS-drawn shelf and issue slip .lib-home-shelf,
 *     .lib-home-spine, .lib-home-slip);
 *  2. the demo sign-in box of a live demo's /login (the Kit's [data-demo-logins] with the library's rows): the Kit's
 *     .alert is a flex row, so ".alert.stack" would put every sign-in side by side and a phone's page grows wider than
 *     the screen (Hotel 1.0.1). Here they are one under another and long e-mail addresses wrap;
 *  3. the "sample data is still being prepared" note in the footer.
 * Light and dark come from the Kit's tokens; sharp corners as in the GetXtra look. Kit files stay untouched.
 */

/* 1. Home page */
.lib-home-hero {
  text-align: start;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.lib-home-hero-inner {
  display: grid;
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}

@media (min-width: 960px) {
  .lib-home-hero-inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.lib-home-hero-text {
  min-width: 0;
}

.lib-home-hero h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.85rem, 1.2rem + 3vw, var(--text-5xl));
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.lib-home-hero .lead {
  max-width: 62ch;
  margin: var(--space-5) 0 0;
  color: var(--text-muted);
  font-size: clamp(var(--text-base), 0.95rem + 0.4vw, var(--text-lg));
  line-height: 1.6;
}

.lib-home-eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  margin: 0 0 var(--space-5);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--brand-border, var(--border));
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand-text, var(--brand));
  font-size: var(--text-sm);
  font-weight: 600;
}

.lib-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-8) 0 0;
}

.lib-home-hero .hero-actions {
  justify-content: flex-start;
}

.lib-home-actions .btn {
  max-width: 100%;
  white-space: normal;
  height: auto;
}

.lib-home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-8) 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.lib-home-chips li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.lib-home-chips .icon {
  color: var(--brand);
}

/* the visual: a shelf of spines with an issue slip in front of it */
.lib-home-art {
  position: relative;
  min-width: 0;
  max-width: 26rem;
  width: 100%;
  margin-inline: auto;
  padding-top: var(--space-8);
}

.lib-home-shelf {
  display: flex;
  align-items: flex-end;
  gap: var(--space-1);
  height: 11rem;
  padding: 0 var(--space-4);
  border-bottom: 0.6rem solid var(--brand-deep, var(--brand));
}

.lib-home-spine {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid rgb(0 0 0 / 0.12);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  overflow: hidden;
}

.lib-home-spine span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 90%;
}

.lib-home-spine-a { height: 100%; background: var(--brand); }
.lib-home-spine-b { height: 82%; background: #b45309; }
.lib-home-spine-c { height: 92%; background: #1e40af; }
.lib-home-spine-d { height: 74%; background: #7c2d12; }

.lib-home-slip {
  position: relative;
  margin: calc(-1 * var(--space-12)) var(--space-4) 0 var(--space-8);
  padding: var(--space-4);
  border: 1px solid var(--border-strong, var(--border));
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
}

.lib-home-slip-head,
.lib-home-slip-member,
.lib-home-slip-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.lib-home-slip-head span,
.lib-home-slip-member > span:first-child {
  color: var(--text-muted);
}

.lib-home-slip-member {
  margin-top: var(--space-2);
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--border);
}

.lib-home-slip-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-2);
  background: var(--success-soft);
  color: var(--success);
  font-size: var(--text-xs);
  font-weight: 600;
}

.lib-home-slip-lines {
  margin: var(--space-3) 0;
  padding: 0;
  list-style: none;
}

.lib-home-slip-lines li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) 0;
}

.lib-home-slip-lines li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lib-home-slip-lines li b {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.lib-home-slip-hold b {
  color: var(--brand-text, var(--brand));
}

.lib-home-slip-foot {
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
}

.lib-home-stamp {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 2px solid var(--brand);
  color: var(--brand-text, var(--brand));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(-6deg);
}

/* sections */
.lib-home-section {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

.lib-home-band {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border);
}

.lib-home-head {
  max-width: 48rem;
  margin: 0 0 var(--space-8);
}

.lib-home-head h2 {
  margin: 0;
  font-size: clamp(var(--text-2xl), 1.2rem + 1.6vw, var(--text-4xl));
  line-height: 1.15;
}

.lib-home-head p {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
}

.lib-home-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.lib-home-grid-4 {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.lib-home-feature {
  min-width: 0;
  padding: var(--space-6);
}

.lib-home-feature h3,
.lib-home-who h3,
.lib-home-steps h3 {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--text-lg);
}

.lib-home-feature p,
.lib-home-who p,
.lib-home-steps p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.lib-home-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: var(--brand-soft);
  color: var(--brand-text, var(--brand));
}

.lib-home-who {
  min-width: 0;
}

.lib-home-who > .icon {
  color: var(--brand);
}

.lib-home-steps {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.lib-home-steps li {
  min-width: 0;
}

.lib-home-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--brand);
  color: var(--brand-fg, #fff);
  font-weight: 700;
}

.lib-home-faq-wrap {
  max-width: 52rem;
}

.lib-home-faq {
  display: grid;
  gap: var(--space-3);
}

.lib-home-faq details {
  padding: var(--space-4) var(--space-5);
}

.lib-home-faq summary {
  cursor: pointer;
  font-weight: 600;
}

.lib-home-faq details p {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.lib-home-cta {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  padding: clamp(var(--space-6), 1rem + 3vw, var(--space-12));
  border: 1px solid var(--brand-border, var(--border));
  background: var(--brand-soft);
}

@media (min-width: 900px) {
  .lib-home-cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.lib-home-cta h2 {
  margin: 0;
  font-size: clamp(var(--text-2xl), 1.2rem + 1.4vw, var(--text-3xl));
}

.lib-home-cta p {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
}

.lib-home-cta .lib-home-actions {
  margin: 0;
}

.lib-home-logins {
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.lib-home-logins li {
  padding: var(--space-1) 0;
  overflow-wrap: anywhere;
}

.lib-home-doors {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

.lib-home-door {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-6);
  color: inherit;
  text-decoration: none;
}

.lib-home-door > .icon {
  color: var(--brand);
}

.lib-home-door span {
  color: var(--text-muted);
}

.lib-home-door:hover,
.lib-home-door:focus-visible {
  border-color: var(--brand);
}

/* 2. The demo sign-ins on /login */
.alert.stack[data-demo-logins] {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.alert.stack[data-demo-logins] > * {
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

.alert.stack[data-demo-logins] .cluster {
  flex-wrap: wrap;
  --cluster-gap: var(--space-2);
}

.alert.stack[data-demo-logins] .small {
  overflow-wrap: anywhere;
  min-width: 0;
}

.alert.stack[data-demo-logins] .btn {
  max-width: 100%;
  height: auto;
  min-height: 2rem;
  padding-block: var(--space-1);
  line-height: 1.3;
  white-space: normal;
  text-align: start;
}

/* 3. "Sample data is still being prepared" (a footer partial inside the footer grid: one full row, never wider) */
.lib-demo-preparing {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
}
