chat history with the NPC modal

This commit is contained in:
2025-11-25 21:16:01 -06:00
parent 20cb279793
commit 196346165f
8 changed files with 244 additions and 46 deletions

View File

@@ -1033,7 +1033,7 @@
.modal-content--sm { max-width: 400px; }
.modal-content--md { max-width: 500px; }
.modal-content--lg { max-width: 700px; }
.modal-content--xl { max-width: 900px; }
.modal-content--xl { max-width: 1000px; } /* Expanded for 3-column NPC chat */
@keyframes slideUp {
from { transform: translateY(20px); opacity: 0; }
@@ -1434,6 +1434,14 @@
min-height: 400px;
}
/* 3-column layout for chat modal with history sidebar */
.npc-modal-body--three-col {
display: grid;
grid-template-columns: 200px 1fr 280px; /* Profile | Chat | History */
gap: 1rem;
max-height: 70vh;
}
/* NPC Profile (Left Column) */
.npc-profile {
width: 200px;
@@ -1587,18 +1595,20 @@
font-weight: 600;
}
/* NPC Conversation (Right Column) */
/* NPC Conversation (Middle Column) */
.npc-conversation {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0; /* Important for grid child to enable scrolling */
}
.npc-conversation .chat-history {
flex: 1;
min-height: 250px;
max-height: none;
max-height: 500px; /* Set max height to enable scrolling */
overflow-y: auto; /* Enable vertical scroll */
}
.chat-empty-state {
@@ -1608,6 +1618,87 @@
font-style: italic;
}
/* ===== NPC CHAT HISTORY SIDEBAR ===== */
.npc-history-panel {
display: flex;
flex-direction: column;
border-left: 1px solid var(--play-border);
padding-left: 1rem;
overflow-y: auto;
max-height: 70vh;
}
.history-header {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-muted);
text-transform: uppercase;
margin-bottom: 0.75rem;
letter-spacing: 0.05em;
}
.history-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
/* Compact history cards */
.history-card {
background: var(--bg-secondary);
border: 1px solid var(--play-border);
border-radius: 4px;
padding: 0.5rem;
font-size: 0.8rem;
transition: background 0.2s;
}
.history-card:hover {
background: var(--bg-tertiary);
}
.history-timestamp {
font-size: 0.7rem;
color: var(--text-muted);
margin-bottom: 0.25rem;
font-style: italic;
}
.history-player {
color: var(--text-primary);
margin-bottom: 0.125rem;
line-height: 1.4;
}
.history-player strong {
color: var(--accent-gold);
}
.history-npc {
color: var(--text-primary);
line-height: 1.4;
}
.history-npc strong {
color: var(--accent-gold);
}
.history-empty {
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
padding: 2rem 0;
font-style: italic;
}
.loading-state-small {
text-align: center;
color: var(--text-muted);
font-size: 0.875rem;
padding: 1rem 0;
font-style: italic;
}
/* Responsive NPC Modal */
@media (max-width: 700px) {
.npc-modal-body {
@@ -1650,6 +1741,31 @@
}
}
/* Responsive: 3-column modal stacks on smaller screens */
@media (max-width: 1024px) {
.npc-modal-body--three-col {
grid-template-columns: 1fr; /* Single column */
grid-template-rows: auto 1fr auto;
}
.npc-profile {
order: 1;
}
.npc-conversation {
order: 2;
}
.npc-history-panel {
order: 3;
border-left: none;
border-top: 1px solid var(--play-border);
padding-left: 0;
padding-top: 1rem;
max-height: 200px; /* Shorter on mobile */
}
}
/* ===== UTILITY CLASSES FOR PLAY SCREEN ===== */
.play-hidden {
display: none !important;