/* Entry 011 — An interface that says no
   Series: Machines of Loving Grace.
   Scene art direction: 1 a.m. blue-black. One frosted-glass panel floats in a
   wide quiet dark, lit only by its own cold screen-glow. The serif refusal line
   is the hero; everything else recedes. One accent: the cold blue of the glow.
   Design focus: a single component, given the whole frame and plenty of air. */

.refuse-scene {
  display: grid;
  place-items: center;
  min-height: 760px;
  padding: 120px 32px;
  border-color: rgba(10, 14, 26, 0.7);
  /* background-first: a real photograph (cold blue light on black) carries the
     scene; a soft scrim keeps the panel and type legible. */
  background-image:
    linear-gradient(180deg, rgba(5, 8, 16, 0.58) 0%, rgba(5, 8, 16, 0.30) 44%, rgba(3, 6, 12, 0.68) 100%),
    url("../../public/media/backgrounds/night-11-huang.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

/* mid layer — the phone's own light, spilled and blurred into the dark */
.halo {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 54%;
  width: min(760px, 88%);
  height: 460px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(96, 138, 228, 0.16), transparent 72%);
  filter: blur(56px);
  pointer-events: none;
  transition: opacity 900ms ease;
}

/* ------------------------------------------------------------------ */
/* THE COMPONENT — one frosted-glass refusal panel                     */
/* ------------------------------------------------------------------ */

.refusal {
  position: relative;
  z-index: 2;
  width: min(620px, 100%);
  display: grid;
  gap: 30px;
  padding: 56px 52px 48px;
  border-radius: 34px;
  font-family: var(--ui-sans);
  /* cold frosted glass: a thin film of light over the photograph */
  background:
    linear-gradient(168deg, rgba(150, 178, 232, 0.13), rgba(12, 20, 42, 0.28));
  border: 1px solid rgba(178, 202, 255, 0.24);
  box-shadow:
    0 1px 0 rgba(214, 230, 255, 0.30) inset,
    0 0 0 1px rgba(8, 12, 22, 0.20),
    0 60px 130px rgba(6, 10, 22, 0.66),
    0 16px 50px rgba(40, 70, 140, 0.28);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  color: #eaf0fb;
  transition: filter 700ms ease, opacity 700ms ease, transform 700ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* machine chrome — small, sans, recessive */
.refusal-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(196, 210, 236, 0.62);
}

.refusal-meta .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #93b6ff;
  box-shadow: 0 0 10px rgba(147, 182, 255, 0.9);
}

.refusal-meta .sep { opacity: 0.5; }
.refusal-meta .lock { color: rgba(214, 226, 248, 0.8); }

/* the soul voice — the hero. serif italic, large, light, never pure white */
.refusal-line {
  margin: 0;
  font-family: "Instrument Serif", "Newsreader", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(42px, 6.8vw, 74px);
  line-height: 1.0;
  letter-spacing: 0.004em;
  color: #f1f5fd;
  text-wrap: balance;
}

.refusal-sub {
  margin: -8px 0 0;
  max-width: 44ch;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.5;
  color: rgba(206, 218, 242, 0.74);
}

/* choices */
.refusal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.btn {
  font-family: var(--ui-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform 180ms ease, background 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

/* Wait — the calm default. soft luminous pill, the brightest thing in the frame */
.btn-wait {
  border: 1px solid rgba(214, 230, 255, 0.5);
  background: linear-gradient(180deg, #eef3fc, #d4e1f6);
  color: #16223a;
  box-shadow: 0 10px 30px rgba(120, 158, 240, 0.3);
}

.btn-wait:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(120, 158, 240, 0.42);
}

/* Override — a ghost. available, but it costs something */
.btn-override {
  border: 1px solid rgba(178, 202, 255, 0.26);
  background: rgba(150, 178, 232, 0.05);
  color: rgba(220, 230, 248, 0.82);
}

.btn-override:hover {
  border-color: rgba(178, 202, 255, 0.5);
  color: #f2f6fd;
}

.btn-override .cost {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0;
  color: rgba(196, 210, 236, 0.5);
}

/* unobtrusive photo attribution, bottom-right of the scene */
.scene-credit {
  position: absolute;
  right: 16px;
  bottom: 13px;
  z-index: 3;
  font-family: var(--ui-sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 228, 244, 0.32);
  pointer-events: none;
}

/* ---- waiting state: the panel quiets, the light steadies ---- */
.refusal[data-state="waiting"] {
  filter: brightness(0.92);
}

.refuse-scene:has(.refusal[data-state="waiting"]) .halo {
  opacity: 0.7;
}

/* ---- opened state: the machine relented; it keeps a quiet record ---- */
.refuse-scene:has(.refusal[data-state="opened"]) .halo {
  opacity: 0.42;
}

.ledger-quiet {
  margin-top: 6px;
  padding-top: 22px;
  border-top: 1px solid rgba(178, 202, 255, 0.16);
  animation: rise 600ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.ledger-head {
  margin: 0 0 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(196, 210, 236, 0.5);
}

.ledger-quiet ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.ledger-quiet li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: "Newsreader", Georgia, serif;
  font-size: 15px;
  color: rgba(214, 226, 248, 0.82);
  animation: rise 460ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.ledger-quiet li time {
  flex: none;
  font-family: var(--ui-sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: rgba(196, 210, 236, 0.5);
  padding-top: 3px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ledger-quiet, .ledger-quiet li { animation: none; }
}

/* ---- small screens ---- */
@media (max-width: 720px) {
  .refuse-scene { padding: 72px 16px; min-height: 0; }
  .refusal { padding: 40px 28px 36px; border-radius: 28px; gap: 24px; }
  .btn { padding: 13px 22px; }
  .btn-override .cost { display: block; margin-top: 2px; }
}
