444 lines
9.9 KiB
CSS
444 lines
9.9 KiB
CSS
/* ============================================================
|
||
NPC Quick Cards — npc-quick-cards.css
|
||
All styles scoped to .npc-quick-cards or an ID unique to
|
||
this module, so nothing bleeds into other UI.
|
||
============================================================ */
|
||
|
||
/* ── Deck window shell ────────────────────────────────────────────────────── */
|
||
|
||
.npc-quick-cards.deck-window {
|
||
/* Let the window chrome show through; internal scroll handled below */
|
||
}
|
||
|
||
.npc-quick-cards .npc-deck-container {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
padding: 6px;
|
||
overflow-y: auto;
|
||
/* Max-height matches DEFAULT_OPTIONS height minus chrome (~38 px) */
|
||
max-height: calc(100% - 8px);
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* ── Individual card ──────────────────────────────────────────────────────── */
|
||
|
||
.npc-card {
|
||
border: 1px solid #444;
|
||
border-radius: 5px;
|
||
background: #1a1a1a;
|
||
transition: border-color 0.18s ease;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.npc-card.active {
|
||
border-color: #c0a060;
|
||
box-shadow: 0 0 6px rgba(192, 160, 96, 0.25);
|
||
}
|
||
|
||
/* Flash animation: fires when bringCardToFront() finds the element */
|
||
.npc-card.flash-highlight {
|
||
animation: nqc-card-flash 0.8s ease-out forwards;
|
||
}
|
||
|
||
@keyframes nqc-card-flash {
|
||
0% { background: #3a2a10; border-color: #e8c070; }
|
||
100% { background: #1a1a1a; border-color: #c0a060; }
|
||
}
|
||
|
||
/* ── Card header ──────────────────────────────────────────────────────────── */
|
||
|
||
.card-header {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 6px 8px;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
border-radius: 4px 4px 0 0;
|
||
transition: background 0.12s;
|
||
}
|
||
|
||
.card-header:hover {
|
||
background: rgba(255, 255, 255, 0.04);
|
||
}
|
||
|
||
.card-portrait {
|
||
width: 32px;
|
||
height: 32px;
|
||
border-radius: 50%;
|
||
object-fit: cover;
|
||
border: 1px solid #555;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.card-name {
|
||
flex: 1;
|
||
font-weight: 700;
|
||
font-size: 0.88em;
|
||
color: #e0c080;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.card-header-actions {
|
||
display: flex;
|
||
gap: 6px;
|
||
align-items: center;
|
||
color: #666;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.card-header-actions a {
|
||
color: #666;
|
||
text-decoration: none;
|
||
transition: color 0.12s;
|
||
}
|
||
|
||
.card-header-actions a:hover,
|
||
.card-toggle-icon:hover {
|
||
color: #c0a060;
|
||
}
|
||
|
||
/* ── Card body ────────────────────────────────────────────────────────────── */
|
||
|
||
.card-body {
|
||
padding: 8px 10px 10px;
|
||
border-top: 1px solid #2e2e2e;
|
||
}
|
||
|
||
.card-section {
|
||
margin-bottom: 14px;
|
||
}
|
||
|
||
.card-section:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.card-section h4 {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 5px;
|
||
font-size: 0.72em;
|
||
text-transform: uppercase;
|
||
letter-spacing: 0.06em;
|
||
color: #777;
|
||
margin: 0 0 6px 0;
|
||
padding-bottom: 4px;
|
||
border-bottom: 1px solid #2a2a2a;
|
||
}
|
||
|
||
.card-section h4 .fas {
|
||
color: #555;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
/* ── Form fields inside a card ────────────────────────────────────────────── */
|
||
|
||
.card-field {
|
||
width: 100%;
|
||
background: #111;
|
||
border: 1px solid #3a3a3a;
|
||
color: #d8d8d8;
|
||
padding: 4px 7px;
|
||
border-radius: 3px;
|
||
font-size: 0.83em;
|
||
margin-bottom: 5px;
|
||
box-sizing: border-box;
|
||
font-family: inherit;
|
||
transition: border-color 0.12s;
|
||
}
|
||
|
||
.card-field:focus {
|
||
border-color: #c0a060;
|
||
outline: none;
|
||
background: #141414;
|
||
}
|
||
|
||
textarea.card-field {
|
||
resize: vertical;
|
||
min-height: 56px;
|
||
}
|
||
|
||
select.card-field {
|
||
cursor: pointer;
|
||
appearance: auto; /* let the browser render the native dropdown arrow */
|
||
}
|
||
|
||
/* Read-only display fields used in npc-card.hbs standalone template */
|
||
.card-display-field {
|
||
font-size: 0.84em;
|
||
color: #c8c8c8;
|
||
margin: 0 0 4px 0;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.quirk-display { font-style: italic; color: #a8a8a8; }
|
||
.manner-display { color: #b8b8b8; }
|
||
|
||
/* ── Personality tags ─────────────────────────────────────────────────────── */
|
||
|
||
.tags-container {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 4px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.personality-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 2px 8px 2px 9px;
|
||
border-radius: 12px;
|
||
font-size: 0.74em;
|
||
font-weight: 700;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* Category colour variants */
|
||
.tag-motivation { background: #3d2a00; color: #ffc944; border: 1px solid #7a5500; }
|
||
.tag-relationship { background: #001a3d; color: #5ab0ff; border: 1px solid #004080; }
|
||
.tag-knowledge { background: #002010; color: #55cc88; border: 1px solid #005530; }
|
||
.tag-danger { background: #2d0000; color: #ff6655; border: 1px solid #660000; }
|
||
.tag-other { background: #1e1e1e; color: #aaaaaa; border: 1px solid #444; }
|
||
|
||
/* × remove button inside a tag chip */
|
||
.tag-remove {
|
||
background: none;
|
||
border: none;
|
||
cursor: pointer;
|
||
color: inherit;
|
||
opacity: 0.5;
|
||
font-size: 0.95em;
|
||
padding: 0;
|
||
line-height: 1;
|
||
transition: opacity 0.12s;
|
||
}
|
||
|
||
.tag-remove:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* "Add Tag" / "Add Secret" dashed-border ghost buttons */
|
||
.add-tag-btn,
|
||
.add-secret-btn {
|
||
background: none;
|
||
border: 1px dashed #484848;
|
||
color: #777;
|
||
font-size: 0.74em;
|
||
padding: 3px 10px;
|
||
border-radius: 3px;
|
||
cursor: pointer;
|
||
margin-top: 2px;
|
||
transition: border-color 0.12s, color 0.12s;
|
||
font-family: inherit;
|
||
}
|
||
|
||
.add-tag-btn:hover,
|
||
.add-secret-btn:hover {
|
||
border-color: #c0a060;
|
||
color: #c0a060;
|
||
}
|
||
|
||
/* ── Attitude tracker ─────────────────────────────────────────────────────── */
|
||
|
||
.attitude-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
margin-bottom: 5px;
|
||
font-size: 0.8em;
|
||
}
|
||
|
||
.attitude-pc-name {
|
||
min-width: 76px;
|
||
max-width: 76px;
|
||
color: #ccc;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
font-size: 0.88em;
|
||
}
|
||
|
||
.attitude-slider {
|
||
flex: 1;
|
||
accent-color: #c0a060;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.attitude-label {
|
||
font-size: 0.7em;
|
||
min-width: 38px;
|
||
color: #555;
|
||
}
|
||
|
||
.attitude-label.hostile { color: #cc5544; text-align: right; }
|
||
.attitude-label.trusted { color: #55cc88; }
|
||
|
||
/* ── Secrets ──────────────────────────────────────────────────────────────── */
|
||
|
||
.secrets-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 3px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.secret-item {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
padding: 5px 7px;
|
||
border-radius: 3px;
|
||
background: #0f0f0f;
|
||
border: 1px solid #242424;
|
||
transition: opacity 0.2s;
|
||
}
|
||
|
||
.secret-item.revealed {
|
||
opacity: 0.45;
|
||
}
|
||
|
||
.secret-item.revealed .secret-text {
|
||
text-decoration: line-through;
|
||
color: #888;
|
||
}
|
||
|
||
.secret-text {
|
||
flex: 1;
|
||
font-size: 0.82em;
|
||
color: #d0d0d0;
|
||
line-height: 1.35;
|
||
}
|
||
|
||
.secret-toggle {
|
||
background: none;
|
||
border: none;
|
||
color: #666;
|
||
cursor: pointer;
|
||
padding: 0 4px;
|
||
font-size: 0.9em;
|
||
transition: color 0.12s;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.secret-toggle:hover {
|
||
color: #c0a060;
|
||
}
|
||
|
||
/* ── Hover tooltip ────────────────────────────────────────────────────────── */
|
||
|
||
#npc-card-tooltip,
|
||
.npc-card-tooltip {
|
||
position: fixed;
|
||
z-index: 9999;
|
||
background: rgba(8, 8, 8, 0.93);
|
||
border: 1px solid #c0a060;
|
||
color: #e0d0b0;
|
||
padding: 7px 11px;
|
||
border-radius: 4px;
|
||
font-size: 0.8em;
|
||
line-height: 1.5;
|
||
max-width: 260px;
|
||
pointer-events: none;
|
||
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
|
||
}
|
||
|
||
#npc-card-tooltip strong,
|
||
.npc-card-tooltip strong {
|
||
display: block;
|
||
color: #e8c880;
|
||
font-size: 1.05em;
|
||
margin-bottom: 2px;
|
||
}
|
||
|
||
#npc-card-tooltip em,
|
||
.npc-card-tooltip em {
|
||
display: block;
|
||
font-style: italic;
|
||
color: #c0b090;
|
||
}
|
||
|
||
#npc-card-tooltip span,
|
||
.npc-card-tooltip span {
|
||
display: block;
|
||
color: #a0a0a0;
|
||
font-size: 0.92em;
|
||
}
|
||
|
||
/* ── Empty state ──────────────────────────────────────────────────────────── */
|
||
|
||
.deck-empty {
|
||
padding: 30px 20px;
|
||
text-align: center;
|
||
color: #555;
|
||
font-size: 0.85em;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.deck-empty-icon {
|
||
font-size: 2.5em;
|
||
opacity: 0.18;
|
||
display: block;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.deck-empty p {
|
||
margin: 0 0 6px 0;
|
||
}
|
||
|
||
.deck-empty-hint {
|
||
font-size: 0.9em;
|
||
color: #444;
|
||
}
|
||
|
||
/* ── Actor Directory toolbar button ───────────────────────────────────────── */
|
||
|
||
.npc-deck-toggle {
|
||
font-size: 0.75em;
|
||
padding: 2px 9px;
|
||
cursor: pointer;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ── Add Tag / Add Secret dialog form ─────────────────────────────────────── */
|
||
|
||
.npc-dialog-form .form-group {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.npc-dialog-form label {
|
||
font-size: 0.82em;
|
||
color: #aaa;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.npc-dialog-form input[type="text"],
|
||
.npc-dialog-form textarea,
|
||
.npc-dialog-form select {
|
||
background: #111;
|
||
border: 1px solid #444;
|
||
color: #ddd;
|
||
border-radius: 3px;
|
||
padding: 5px 7px;
|
||
font-family: inherit;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.npc-dialog-form textarea {
|
||
resize: vertical;
|
||
min-height: 72px;
|
||
}
|
||
|
||
.npc-dialog-form input:focus,
|
||
.npc-dialog-form textarea:focus,
|
||
.npc-dialog-form select:focus {
|
||
border-color: #c0a060;
|
||
outline: none;
|
||
}
|