/* box details (lib/details.js): the "The details" gift tag + its inline edit form.
   Shared by create, tag, lobby, mysanta and home, so it lives with the other lib pieces. */

.details-slot { margin: 6px 0 0; }
.details-slot[hidden] { display: none; }
/* The scroll: gift tags are people, the scroll is the box's rules. Rolled rods top and bottom. */
.details-card, .details-form { --parch: oklch(0.945 0.045 88); --parch-edge: oklch(0.86 0.06 80); position: relative; margin: 0; transform: rotate(0.3deg); filter: drop-shadow(0 8px 8px oklch(0.3 0.03 50 / 0.22)); }
.scroll-rod {
  position: relative; z-index: 1; display: block; height: 16px; margin: 0 -8px; border-radius: 8px;
  background: linear-gradient(180deg, oklch(0.8 0.07 68) 0%, oklch(0.67 0.07 62) 40%, oklch(0.5 0.06 55) 80%, oklch(0.4 0.05 52) 100%);
  box-shadow: 0 2px 3px oklch(0.3 0.03 50 / 0.3);
}
.scroll-rod::before, .scroll-rod::after {
  content: ""; position: absolute; top: -2px; width: 10px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, oklch(0.84 0.07 70), oklch(0.5 0.06 55) 80%);
  box-shadow: 0 1px 2px oklch(0.3 0.03 50 / 0.4);
}
.scroll-rod::before { left: -3px; }
.scroll-rod::after { right: -3px; }
.scroll-sheet {
  position: relative; margin: -4px 0; padding: 26px 22px 24px; display: flex; flex-direction: column; gap: 4px;
  background:
    linear-gradient(90deg, oklch(0.8 0.06 78 / 0.45), transparent 7%, transparent 93%, oklch(0.8 0.06 78 / 0.45)),
    linear-gradient(180deg, oklch(0.84 0.06 78 / 0.5), transparent 9%, transparent 91%, oklch(0.84 0.06 78 / 0.5)),
    radial-gradient(ellipse at 30% 20%, oklch(0.97 0.035 90), var(--parch) 60%, var(--parch-edge) 130%);
  clip-path: polygon(0 0, 100% 0, 99.2% 12%, 100% 26%, 99.4% 41%, 100% 58%, 99.3% 74%, 100% 88%, 99.5% 100%, 0 100%, 0.7% 86%, 0 70%, 0.6% 54%, 0 38%, 0.7% 22%);
}
.details-form .scroll-sheet { padding-bottom: 28px; }
.scroll-seal {
  position: absolute; top: 12px; right: 16px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, oklch(0.6 0.17 27), var(--red) 55%, var(--red-dark));
  box-shadow: inset 0 -2px 2px oklch(0.25 0.12 27 / 0.6), inset 0 1px 1px oklch(0.8 0.1 27 / 0.5), 0 2px 3px oklch(0.3 0.03 50 / 0.35);
}
.scroll-seal::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid oklch(0.3 0.12 27 / 0.55); }
.tag-screen .details-slot { margin-top: 18px; }
.details-budget { font-size: 40px; line-height: 1; color: oklch(0.3 0.08 255); overflow-wrap: anywhere; }
.details-date { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.details-cal { display: inline-flex; color: var(--red); }
.details-when { color: var(--soft); font-weight: 500; }
.details-desc { font-family: var(--hand); font-weight: 600; font-size: 23px; line-height: 1.15; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.details-empty { color: var(--soft); font-size: 22px; }
.details-edit {
  align-self: flex-start; min-height: 44px; margin-top: 4px; padding: 0 2px; border: 0; background: none;
  color: var(--red); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

.details-fields { display: flex; flex-direction: column; gap: 4px; }
.details-label { margin-top: 6px; color: oklch(0.38 0.03 55); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.details-input {
  width: 100%; min-height: 44px; padding: 6px 2px; border: 0; border-bottom: 2px dotted oklch(0.6 0.07 62);
  background: transparent; font-family: var(--hand); font-weight: 600; font-size: 24px; color: oklch(0.28 0.05 260); border-radius: 0;
}
.details-input::placeholder { color: var(--soft); opacity: 0.5; }
.details-input:focus-visible { outline: none; border-bottom-color: var(--red); }
.details-textarea { resize: vertical; line-height: 1.15; }
input[type="date"].details-input { font-size: 20px; }
.details-err { color: var(--red-dark); font-size: 14px; margin-top: 4px; }
.details-err[hidden] { display: none; }
.details-actions { display: flex; gap: 10px; margin-top: 10px; }
.details-actions .btn { flex: 1; padding: 0 12px; }

/* create: the collapsible section under the party-name tag */
.details-more { margin: 0 6px; }
.details-more > summary {
  min-height: 44px; display: flex; align-items: center; cursor: pointer; list-style: none;
  color: var(--red); font-weight: 600; font-size: 15px;
}
.details-more > summary::-webkit-details-marker { display: none; }
.details-more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--red); color: #fff; font-size: 16px; line-height: 1; }
.details-more[open] > summary::before { content: "\2212"; }
.details-more .details-fields { padding: 4px 4px 8px; }

/* home: summary line under the status */
.home-details[hidden] { display: none; }
.home-details { font-size: 14px; color: var(--soft); overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) { .details-card, .details-form { transform: none; } }
