/* ---------- Panel ---------- */

.panel {
  position: sticky;
  top: 16px;
  padding: 24px;
  border-radius: var(--r-card);
  background: var(--white);
  border: 1px solid var(--line);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.panel h2 {
  font: 900 40px/0.95 var(--display);
  text-transform: uppercase;
  color: var(--black);
  padding-right: 40px;
}

.panel h3 {
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.panel > p {
  margin: 10px 0 0;
}

.panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--page);
}

.icon-btn:hover {
  background: var(--line);
}

.meta {
  color: var(--muted);
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  text-align: left;
  line-height: 1.2;
}

.chip strong {
  font: 800 22px/1 var(--display);
  text-transform: uppercase;
}

.chip span {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.9;
}

.chip:hover {
  background: var(--red-dark);
}

.how {
  margin: 24px 0 0;
  padding: 16px 0 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.how li + li {
  margin-top: 4px;
}

.status {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  line-height: 1.35;
}

.status span {
  font-size: 15px;
}

.status-free {
  background: var(--red);
  color: var(--white);
}

.status-soon {
  background: var(--red-soft);
  color: var(--red-ink);
}

.status-taken {
  background: var(--page);
}

.status-requested {
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--red);
  color: var(--red-ink);
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
}

.ticks li + li {
  margin-top: 4px;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.45em;
  width: 9px;
  height: 5px;
  border-left: 2.5px solid var(--red);
  border-bottom: 2.5px solid var(--red);
  transform: rotate(-45deg);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 800;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
}

.btn-primary:hover {
  background: #2b2b2b;
}

.btn-primary:disabled {
  background: var(--off);
  color: var(--off-ink);
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border-color: var(--black);
}

.btn-ghost:hover {
  background: var(--page);
}

.btn-wide {
  width: 100%;
  margin-top: 24px;
}

.btn-small {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
}

/* Form */

.form-summary {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--page);
  line-height: 1.35;
}

.form-summary span {
  color: var(--muted);
  font-size: 15px;
}

.form-error {
  margin-top: 6px;
  font-style: normal;
  font-weight: 700;
  color: var(--red);
}

.request-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.form-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 6px;
}

/* Ticket */

.ticket {
  display: grid;
  grid-template-columns: 1fr 72px;
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  position: relative;
}

.ticket-body {
  padding: 20px;
}

.ticket h2 {
  color: var(--white);
  padding: 0;
}

.stamp {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 10px;
  border: 2.5px solid var(--red);
  border-radius: 4px;
  color: #ff4d4d;
  font: 800 20px/1.1 var(--stencil);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(-4deg);
  animation: stamp 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes stamp {
  from {
    transform: rotate(-4deg) scale(1.6);
    opacity: 0;
  }
}

.ticket dl {
  margin: 14px 0 0;
  display: grid;
  gap: 6px;
}

.ticket dl div {
  display: grid;
  grid-template-columns: 76px 1fr;
}

.ticket dt {
  color: #a9a9a9;
  font-size: 14px;
}

.ticket dd {
  margin: 0;
  font-weight: 700;
}

.ticket-stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-left: 2px dashed #4b4b4b;
  background: var(--red);
}

.ticket-stub span {
  font-size: 12px;
  font-weight: 700;
}

.ticket-stub strong {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 800 24px/1 var(--stencil);
  letter-spacing: 0.05em;
}

/* Notches where the stub tears off */
.ticket::before,
.ticket::after {
  content: '';
  position: absolute;
  right: 61px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
}
.ticket::before {
  top: -11px;
}
.ticket::after {
  bottom: -11px;
}

.done-note {
  color: var(--muted);
}

.done-note strong {
  color: var(--text);
}

/* ---------- Requests drawer ---------- */

.drawer {
  margin: 0 0 0 auto;
  width: min(440px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: var(--white);
}

.drawer::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.drawer[open] {
  animation: slide-in 0.2s ease-out;
}

@keyframes slide-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}

.drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
}

.drawer-head h2 {
  font: 900 34px/1 var(--display);
  text-transform: uppercase;
}

.drawer-tabs {
  display: flex;
  gap: 4px;
  margin: 0 20px;
  padding: 4px;
  border-radius: 999px;
  background: var(--page);
}

.drawer-tabs button {
  flex: 1;
  padding: 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
}

.drawer-tabs button[aria-selected='true'] {
  background: var(--white);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.drawer-body .btn-small {
  align-self: flex-start;
  margin-top: 8px;
}

.drawer-intro,
.empty {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 15px;
}

.req {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: 10px;
}

.req[data-status='confirmed'] {
  border-left-color: var(--black);
}

.req[data-status='declined'] {
  border-left-color: var(--off-ink);
  opacity: 0.7;
}

.req p {
  margin: 4px 0 0;
}

.req-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.req-top strong {
  font: 800 24px/1 var(--display);
  text-transform: uppercase;
}

.req-status {
  font-size: 13px;
  font-weight: 800;
  color: var(--red);
}

.req[data-status='confirmed'] .req-status {
  color: var(--black);
}

.req[data-status='declined'] .req-status {
  color: var(--muted);
}

.req-when {
  font-weight: 700;
}

.req-who,
.req-notes,
.req-ref {
  font-size: 14px;
  color: var(--muted);
}

.req-who a {
  color: var(--text);
  margin-right: 8px;
}

.req-notes {
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.req-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.req-actions .btn {
  min-height: 40px;
  padding: 6px 18px;
}

.defs {
  position: absolute;
}

