/* Cover Genie · Say Thanks modal, attachment picker, "sent" state, owner card.
   Everything uses the site's colour tokens, so dark + light themes both work. */

/* ---------- Say Thanks modal ---------- */
.sayt-card { max-width: 380px; }
.sayt-card:focus { outline: none; }
.sayt-hero { position: relative; width: 64px; height: 64px; margin: 2px auto 16px; display: grid; place-items: center; }
.sayt-icon { position: relative; z-index: 1; width: 64px; height: 64px; font-size: 28px; }
.sayt-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--brass); opacity: 0;
}
.sayt-modal.show .sayt-ring { animation: saytRipple 2.2s cubic-bezier(.2, .6, .3, 1) infinite; }
.sayt-modal.show .sayt-ring.r2 { animation-delay: 1.1s; border-color: var(--teal); }
.sayt-wave { display: inline-block; font-size: .85em; color: var(--brass-2); transform-origin: 70% 80%; margin-right: 2px; }
.sayt-modal.show .sayt-wave { animation: saytWave 1.6s ease-in-out .45s 2; }
.sayt-icon i { animation: heartBeat 1.8s ease-in-out infinite; }
.sayt-modal.show .sayt-compose > * { animation: saytRise .5s var(--ease) both; }
.sayt-modal.show .sayt-compose > *:nth-child(2) { animation-delay: .08s; }
.sayt-modal.show .sayt-compose > *:nth-child(3) { animation-delay: .14s; }
.sayt-modal.show .sayt-compose > *:nth-child(4) { animation-delay: .2s; }
.sayt-modal.show .sayt-compose > *:nth-child(n+5) { animation-delay: .26s; }

.sayt-hearts { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sayt-hearts i { position: absolute; bottom: -18px; color: var(--brass-2); opacity: 0; font-size: 12px; }
.sayt-modal.show .sayt-hearts i { animation: saytFloat 4.6s ease-in infinite; }
.sayt-hearts i:nth-child(1) { left: 8%;  animation-delay: .2s; font-size: 10px; }
.sayt-hearts i:nth-child(2) { left: 22%; animation-delay: 1.4s; color: var(--teal); }
.sayt-hearts i:nth-child(3) { left: 38%; animation-delay: 2.6s; font-size: 9px; }
.sayt-hearts i:nth-child(4) { left: 55%; animation-delay: .8s; font-size: 14px; }
.sayt-hearts i:nth-child(5) { left: 70%; animation-delay: 2s; color: var(--teal); font-size: 10px; }
.sayt-hearts i:nth-child(6) { left: 84%; animation-delay: 3.1s; }
.sayt-hearts i:nth-child(7) { left: 93%; animation-delay: 1.8s; font-size: 8px; }

.sayt-view[hidden], .sayt-err[hidden] { display: none; }
.sayt-view { position: relative; z-index: 1; }
.sayt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 12px; }
.sayt-chip {
  font: inherit; font-size: 11px; font-weight: 600; cursor: pointer;
  padding: 5px 11px; border-radius: 999px;
  color: var(--brass-2); background: rgba(214, 162, 74, .1); border: 1px solid rgba(214, 162, 74, .32);
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.sayt-chip:hover { background: rgba(214, 162, 74, .22); transform: translateY(-1px); }
.sayt-chip:active { transform: scale(.96); }
.sayt-field {
  display: block; width: 100%; box-sizing: border-box; margin: 0 0 9px; padding: 10px 12px;
  font: inherit; font-size: 13px; color: var(--text); text-align: left;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 9px; resize: none;
}
.sayt-field::placeholder { color: var(--text-faint); }
.sayt-field:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(95, 192, 180, .18); }
.sayt-send .heart { display: inline-flex; animation: heartBeat 1.8s ease-in-out infinite; }
.sayt-send.is-busy, .thanks-thanks-btn.is-busy { opacity: .75; pointer-events: none; }
.sayt-err { margin: 10px 0 0; font-size: 11.5px; color: var(--danger); }
.sayt-err a { color: inherit; text-decoration: underline; }
.thanks-thanks-btn { position: relative; }
.thanks-thanks-btn.is-sent { pointer-events: none; background: rgba(105, 196, 134, .16); border-color: rgba(105, 196, 134, .55); color: var(--ok); }
.sayt-icon-done { background: linear-gradient(140deg, #f7a9b8, #e2685a 60%, #b8402f); color: #fff; box-shadow: 0 8px 22px -6px rgba(226, 104, 90, .55), inset 0 1px 0 rgba(255, 255, 255, .35); }
.sayt-modal.show .sayt-done .sayt-icon-done { animation: saytPop .6s var(--ease) both; }

/* heart burst (Send Thanks button / download popup button) */
.sayt-burst { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 5; }
.sayt-burst i {
  position: absolute; left: 50%; top: 50%; color: #ef6a7d; opacity: 0;
  animation: saytBurst .95s cubic-bezier(.15, .7, .3, 1) forwards;
}
.sayt-burst i:nth-child(3n) { color: var(--brass-2); }
.sayt-burst i:nth-child(4n) { color: var(--teal); }

@keyframes saytRipple { 0% { transform: scale(.7); opacity: .55; } 100% { transform: scale(2); opacity: 0; } }
@keyframes saytWave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-10deg); } 45% { transform: rotate(14deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(8deg); } }
@keyframes saytRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes saytFloat { 0% { transform: translateY(0) scale(.8); opacity: 0; } 12% { opacity: .75; } 100% { transform: translateY(-420px) scale(1.15) rotate(18deg); opacity: 0; } }
@keyframes saytBurst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1.1); opacity: 0; } }
@keyframes saytPop { 0% { transform: scale(.2); opacity: 0; } 60% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .sayt-ring, .sayt-hearts i, .sayt-wave, .sayt-icon i, .sayt-send .heart { animation: none !important; }
  .sayt-modal.show .sayt-compose > * { animation: none; }
}

/* ---------- attachment picker (Contact / Contribute) ---------- */
.cg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cg-attach { margin-top: 0; }
.info-contact-form .cg-attach-drop, .info-contact-form .cg-attach-chip { margin-top: 0; }
.cg-attach-drop {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  box-sizing: border-box; padding: 11px 12px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-dim); background: transparent; border: 1.5px dashed var(--line-2); border-radius: 9px;
  transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease);
}
.cg-attach-drop:hover { color: var(--teal); border-color: var(--teal); background: rgba(95, 192, 180, .07); }
.cg-attach-drop i { font-size: 13px; }
.cg-attach-chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  background: rgba(95, 192, 180, .09); border: 1px solid rgba(95, 192, 180, .34); animation: saytRise .3s var(--ease) both;
}
.cg-attach-chip[hidden], .cg-attach-drop[hidden], .cg-attach-err[hidden] { display: none; }
.cg-attach-chip > i { color: var(--teal); font-size: 16px; flex: none; }
.cg-attach-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-attach-size { flex: none; font-size: 10.5px; color: var(--text-faint); font-family: 'JetBrains Mono', monospace; }
.cg-attach-x {
  flex: none; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer;
  color: var(--text-dim); background: transparent; border: 0; border-radius: 50%;
}
.cg-attach-x:hover { color: var(--danger); background: rgba(226, 104, 90, .14); }
.cg-attach-err { margin: 6px 0 0; font-size: 11px; color: var(--danger); }
.info-contact-form .btn.is-busy { opacity: .7; pointer-events: none; }

/* ---------- animated "sent" state ---------- */
.info-contact-form.is-sent > *:not(.cg-sent) { display: none !important; }
.cg-sent { text-align: center; padding: 26px 6px 8px; animation: saytRise .45s var(--ease) both; }
.cg-sent-check { width: 62px; height: 62px; margin: 0 auto 12px; display: block; }
.cg-sent-check circle { fill: rgba(105, 196, 134, .12); stroke: var(--ok); stroke-width: 2.5; stroke-dasharray: 145; stroke-dashoffset: 145; animation: cgDraw .6s ease forwards; }
.cg-sent-check path { fill: none; stroke: var(--ok); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: cgDraw .4s ease .45s forwards; }
.cg-sent h4 { margin: 0 0 6px; font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: var(--text); }
.cg-sent p { margin: 0 0 14px; font-size: 12px; line-height: 1.6; color: var(--text-dim); }
.cg-sent .btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; margin-top: 0; }
@keyframes cgDraw { to { stroke-dashoffset: 0; } }

/* ---------- owner card (static, never editable) ---------- */
.owner-card {
  position: relative; margin: 10px 0 4px; padding: 13px 13px 12px; border-radius: 12px;
  background: linear-gradient(150deg, rgba(214, 162, 74, .2), rgba(214, 162, 74, .06) 60%, rgba(95, 192, 180, .07));
  border: 1px solid rgba(214, 162, 74, .55);
  box-shadow: 0 0 0 3px rgba(214, 162, 74, .07), 0 10px 26px -14px rgba(214, 162, 74, .55);
  overflow: hidden;
}
.owner-card::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60px; left: -80px; transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .13), transparent);
  animation: ownerShine 5.5s ease-in-out infinite;
}
.owner-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px;
  padding: 2px 9px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--brass-ink); background: linear-gradient(135deg, var(--brass-2), var(--brass));
}
.owner-card { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 11px 11px 10px; }
.owner-card .owner-badge { flex: none; margin: 0; }
.owner-card .contributor-avatar { width: 46px; height: 46px; font-size: 18px; box-shadow: 0 0 0 2px rgba(240, 195, 120, .85), 0 6px 14px -6px rgba(214, 162, 74, .75); }
.owner-card .contributor-name { font-size: 14px; }
.owner-card .contributor-role { color: var(--text-dim); font-weight: 600; }
/* long attachment names must never widen the form column */
.info-contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.info-contact-form, .info-contact-cards, .cg-attach { min-width: 0; max-width: 100%; }
.cg-attach-chip { max-width: 100%; box-sizing: border-box; }
@media (max-width: 600px) { .info-contact-grid { grid-template-columns: minmax(0, 1fr); } }
@keyframes ownerShine { 0%, 55% { left: -80px; } 100% { left: 120%; } }
@media (prefers-reduced-motion: reduce) { .owner-card::after { animation: none; } }
.contributor-empty { font-size: 11.5px; color: var(--text-dim); border-top-style: dashed; }
@media print { .sayt-modal { display: none !important; } }

/* ---------- "Do you want to say more?" (optional note, offered after the thanks is delivered) ---------- */
.sayt-more { margin: 14px 0 4px; }
.sayt-more[hidden], .sayt-say[hidden], .sayt-back[hidden], .sayt-more-btn[hidden] { display: none; }
.sayt-more-btn { width: 100%; justify-content: center; gap: 8px; }
.sayt-say { text-align: left; animation: saytRise .35s var(--ease) both; }
.sayt-say .sayt-chips { margin-top: 2px; }
.sayt-send-note { width: 100%; justify-content: center; }
.sayt-send-note.is-busy { opacity: .75; pointer-events: none; }
.sayt-back { margin-top: 12px; }
.sayt-done .sayt-err { text-align: center; margin: 12px 0 0; }
