/* MV_SealedMessage (#439) — the closed-envelope card for a time-capsule
   story. One look everywhere it appears (person panel, life-story timeline,
   chronicle): a warm terracotta-washed "envelope" with a fine flap line drawn
   across its top, the message medallion, and quiet from/for/opens lines. The
   content never renders here — that's the whole point of the card. */

.sealed-message {
  position: relative;
  padding: var(--space-md);
  background-color: var(--color-highlight-soft);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* The envelope flap: two fine strokes meeting at a point below the top edge,
   drawn with gradients so it needs no extra markup and stays subtle. */
.sealed-message::before,
.sealed-message::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 50%;
  height: 26px;
  pointer-events: none;
  border-bottom: 1px solid rgba(164, 94, 52, 0.28); /* highlight-hover at low alpha */
}

.sealed-message::before {
  left: 0;
  transform: skewY(6deg);
  transform-origin: left top;
}

.sealed-message::after {
  right: 0;
  transform: skewY(-6deg);
  transform-origin: right top;
}

.sealed-message__head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative; /* above the flap strokes */
}

.sealed-message__heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sealed-message__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.sealed-message__opens {
  font-size: var(--font-size-xs);
  color: var(--color-highlight-hover);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
}

/* "From <chip>, for <chip>" — the white name-pills lift off the tinted
   envelope, matching the design language's "people = white name-pills".
   Plain inline flow (not flex) so the sentence's commas and "and" sit
   naturally against the chips; line-height gives wrapped lines air. */
.sealed-message__meta {
  margin-top: var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 2;
}

.sealed-message__chip {
  display: inline-block;
  padding: 2px var(--space-xs);
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.sealed-message__chip:hover,
.sealed-message__chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.sealed-message__chip:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.sealed-message__note {
  margin: var(--space-xs) 0 0;
  font-size: var(--font-size-xs);
  font-style: italic;
  color: var(--color-text-muted);
}

.sealed-message__actions {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding-top: var(--space-xs);
  border-top: 1px dashed rgba(164, 94, 52, 0.28);
}

.sealed-message__actions .btn {
  font-size: var(--font-size-xs);
  padding: 4px 10px;
}

/* Gentle reveal for a message whose day has come (#439): the opened story
   body rises softly into place the first time it's disclosed. Surfaces add
   this class to the revealed content; reduced-motion readers get an instant,
   still reveal. */
.mv-seal-reveal {
  animation: mv-seal-reveal 560ms var(--ease-out-soft);
}

@keyframes mv-seal-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mv-seal-reveal {
    animation: none;
  }
}
