/* story-tasks.css — the corner slip for a new/closed objective, the
   NEW stamp in the Detective's Diary, the dot on the DIARY nav button.
   js/story-tasks.js */

#storyTaskSlips {
  position: fixed; top: 18px; right: 18px;
  z-index: 1000060; pointer-events: none;
  display: flex; flex-direction: column; gap: 10px;
  width: min(360px, calc(100vw - 36px));
}
#storyTaskSlips .st-slip {
  pointer-events: auto; cursor: pointer;
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 30%),
    #EBE6D8;
  color: #5F5449;
  border: 1px solid #8E7F7F;
  border-left: 4px solid #8B0000;
  box-shadow: 0 10px 28px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.25);
  font-family: 'Courier New', Courier, monospace;
  padding: 10px 14px 9px 14px;
  transform: translateX(120%); opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
#storyTaskSlips .st-slip::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.025) 0 1px, transparent 1px 4px);
  opacity: .5;
}
#storyTaskSlips .st-slip.st-in { transform: translateX(0) rotate(var(--st-tilt, 0deg)); opacity: 1; }
#storyTaskSlips .st-slip.st-out { transform: translateX(120%) rotate(var(--st-tilt, 0deg)); opacity: 0; }
#storyTaskSlips .st-slip.st-done { border-left-color: #4a7c59; }
#storyTaskSlips .st-stamp {
  display: inline-block; font-size: 10px; letter-spacing: 3px; font-weight: bold;
  color: #8B0000; border: 1px solid #8B0000; padding: 2px 7px 1px;
  transform: rotate(-1.5deg); margin-bottom: 7px;
}
#storyTaskSlips .st-done .st-stamp { color: #4a7c59; border-color: #4a7c59; }
#storyTaskSlips .st-title {
  font-size: 12px; font-weight: bold; letter-spacing: 1px; line-height: 1.3;
  color: #3A3238;
}
#storyTaskSlips .st-done .st-title { text-decoration: line-through; text-decoration-color: rgba(74,124,89,.7); }
#storyTaskSlips .st-line { font-size: 11px; line-height: 1.4; margin-top: 5px; font-style: italic; }
#storyTaskSlips .st-foot {
  margin-top: 7px; font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
  color: #8E7F7F;
}

/* the NEW stamp on a diary row */
#diaryPanel .diary-tg.st-new { font-weight: bold; }

/* the dot on the DIARY nav button while a task is unread */
.panel-nav-btn[data-tour-keep="diary"] { position: relative; }
.panel-nav-btn[data-tour-keep="diary"].st-has-new::after {
  content: ''; position: absolute; top: 4px; right: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #8B0000; box-shadow: 0 0 6px rgba(139,0,0,.8);
  animation: stDot 1.6s ease-in-out infinite;
}
@keyframes stDot { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* WRITTEN BY HAND (the author, 2026-10-15: "писатись мають аля від руки").
   The stamp stays a rubber stamp; what is under it is his handwriting —
   Caveat (css/fonts.css), blue-black ink, written on left to right once
   the slip has landed: the title first, then the line, then the foot. */
#storyTaskSlips .st-title,
#storyTaskSlips .st-line,
#storyTaskSlips .st-foot {
  font-family: 'Caveat', 'Segoe Print', cursive;
  color: #1f2a44;
  clip-path: inset(0 100% 0 0);
}
#storyTaskSlips .st-title { font-size: 21px; font-weight: 700; letter-spacing: .3px; line-height: 1.1; }
#storyTaskSlips .st-line  { font-size: 17px; font-style: normal; line-height: 1.2; margin-top: 3px; color: #2c3550; }
#storyTaskSlips .st-foot  { font-size: 14px; letter-spacing: .5px; text-transform: none; color: #6b6a72; margin-top: 4px; }
#storyTaskSlips .st-slip.st-in .st-title { animation: stWrite .9s steps(18, end) .35s forwards; }
#storyTaskSlips .st-slip.st-in .st-line  { animation: stWrite 1.1s steps(22, end) 1.2s forwards; }
#storyTaskSlips .st-slip.st-in .st-foot  { animation: stWrite .6s steps(12, end) 2.25s forwards; }
@keyframes stWrite { to { clip-path: inset(0 0 0 0); } }
#storyTaskSlips .st-done .st-title { text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) {
  #storyTaskSlips .st-title, #storyTaskSlips .st-line, #storyTaskSlips .st-foot { clip-path: none; animation: none !important; }
}
