/* Event stages in the owner's History: a quiet vertical timeline in a glass card. */
.event-stages { list-style: none; margin: 14px 0 4px; padding: 16px 18px; display: grid; gap: 0; border-radius: 20px; background: rgba(255, 255, 255, .66); border: 1px solid rgba(123, 77, 255, .14); }
.event-stage { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 0 0 16px; animation: sp-stage-in .32s var(--sp-ease-glide) both; }
.event-stage:last-child { padding-bottom: 0; }
.event-stage:not(:last-child)::before { content: ""; position: absolute; left: 8px; top: 16px; bottom: 0; width: 2px; border-radius: 2px; background: rgba(123, 77, 255, .22); }
.event-stage-dot { width: 12px; height: 12px; margin: 4px 0 0 3px; border-radius: 50%; background: #fff; border: 2px solid #7b4dff; }
.event-stage-closing .event-stage-dot { background: #7b4dff; }
.event-stage-copy { display: grid; gap: 2px; }
.event-stages .event-stage-copy strong { font-size: 14px; line-height: 1.4; color: #0b285b; }
.event-stages .event-stage-copy time { font-size: 12px; color: #52698f; }
.event-stage:nth-child(2) { animation-delay: .04s; } .event-stage:nth-child(3) { animation-delay: .08s; } .event-stage:nth-child(n+4) { animation-delay: .12s; }
@keyframes sp-stage-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .event-stage { animation: none; } }
html[data-theme="dark"] .event-stages { background: rgba(15, 28, 58, .62); border-color: rgba(123, 77, 255, .26); }
html[data-theme="dark"] .event-stages .event-stage-copy strong { color: #f5f8ff !important; }
html[data-theme="dark"] .event-stages .event-stage-copy time { color: #9fb4d2 !important; }
html[data-theme="dark"] .event-stage-dot { background: #0f1c3a; }
html[data-theme="dark"] .event-stage-closing .event-stage-dot { background: #7b4dff; }

/* Event History for long histories: summary, search, outcome chips, month groups, more on scroll. */
.event-history-summary { margin: -2px 0 16px !important; font-size: 14px; font-weight: 650; color: #52698f; }
.event-history-tools { display: grid; gap: 12px; margin: 0 0 18px; }
.event-history-tools[hidden] { display: none; }
.event-history-search { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: 999px; color: #52698f; background: rgba(255, 255, 255, .72); border: 1px solid rgba(123, 77, 255, .16); transition: border-color .2s ease, background .2s ease; }
.event-history-search:focus-within { border-color: #7b4dff; background: #fff; }
.event-history-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; color: #0b285b; }
.event-history-chips { position: relative; display: flex; gap: 6px; padding: 4px; overflow-x: auto; scrollbar-width: none; border-radius: 999px; background: rgba(255, 255, 255, .55); border: 1px solid rgba(123, 77, 255, .12); width: max-content; max-width: 100%; }
.event-history-chips::-webkit-scrollbar { display: none; }
.event-history-chips[hidden] { display: none; }
.event-history-chip { flex: none; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 13.5px; font-weight: 700; color: #52698f; cursor: pointer; white-space: nowrap; transition: color .2s ease; }
.event-history-chip span { margin-left: 4px; font-weight: 800; opacity: .75; }
.event-history-chip { position: relative; z-index: 1; }
.event-history-chip[aria-pressed="true"] { color: #fff; }
.event-history-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: linear-gradient(140deg, #9b6bff, #7b4dff 45%, #4d7bff); transition: transform var(--sp-dur-snappy) var(--sp-ease-snappy), width var(--sp-dur-snappy) var(--sp-ease-snappy); }
/* Without the sliding thumb (motion off), the chosen chip still reads clearly. */
@media (prefers-reduced-motion: reduce) { .event-history-thumb { transition: none !important; } }
.event-history-month { margin: 0 0 22px; animation: sp-stage-in .3s var(--sp-ease-glide) both; }
.event-history-month h6 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 15px; font-weight: 800; color: #0b285b; }
.event-history-month h6 span { font-size: 12.5px; font-weight: 650; color: #52698f; }
.event-history-more { display: grid; justify-items: center; padding: 4px 0 8px; }
.event-history-more-button { min-height: 46px; padding: 0 26px; border-radius: 999px; border: 1px solid rgba(123, 77, 255, .22); background: rgba(255, 255, 255, .72); font: inherit; font-weight: 750; color: #0b285b; cursor: pointer; }
.event-history-more-button:hover { border-color: #7b4dff; }
.event-history-loading { margin: 0; font-size: 13px; color: #52698f; }
html[data-theme="dark"] .event-history-summary, html[data-theme="dark"] .event-history-month h6 span, html[data-theme="dark"] .event-history-loading { color: #9fb4d2 !important; }
html[data-theme="dark"] .event-history-month h6 { color: #f5f8ff; }
html[data-theme="dark"] .event-history-search { color: #9fb4d2; background: rgba(15, 28, 58, .7); border-color: rgba(123, 77, 255, .28); }
html[data-theme="dark"] .event-history-search:focus-within { background: rgba(15, 28, 58, .95); border-color: #8f6bff; }
html[data-theme="dark"] .event-history-search input { color: #f5f8ff; }
html[data-theme="dark"] .event-history-chips { background: rgba(15, 28, 58, .62); border-color: rgba(123, 77, 255, .26); }
html[data-theme="dark"] .event-history-chip { color: #9fb4d2; }
html[data-theme="dark"] .event-history-chip[aria-pressed="true"] { color: #fff; }
html[data-theme="dark"] .event-history-more-button { color: #f5f8ff; background: rgba(15, 28, 58, .7); border-color: rgba(123, 77, 255, .3); }
/* The app's global field style must not draw a box inside the search pill. */
.event-history-search input, html[data-theme="dark"] .event-history-search input { min-height: 0; padding: 0; border: 0 !important; border-radius: 0; background: transparent !important; }
.event-history-search input::placeholder { color: #52698f !important; opacity: 1; }
html[data-theme="dark"] .event-history-search input::placeholder { color: #9fb4d2 !important; -webkit-text-fill-color: #9fb4d2; }
