/* Little Slagsbury 3D — Retro Slagsbury UI Theme */

/* --- Interaction Prompt HUD --- */
#slagInteractPrompt {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(24, 21, 18, 0.92);
  border: 1px solid #c9a227;
  color: #ffeb9e;
  padding: 6px 16px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.8);
  pointer-events: none;
  display: none;
  z-index: 100;
  text-shadow: 1px 1px 0 #000;
}

#slagCrosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99;
}

/* --- Dialogue Overlay Box --- */
#slagDialogueOverlay {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 94vw);
  background: rgba(24, 21, 18, 0.96);
  border: 1px solid #8a8070;
  border-radius: 2px;
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 16px;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  user-select: none;
}

.slag-speaker-tag {
  position: absolute;
  top: -14px;
  left: 16px;
  background: #cc0000;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.slag-dialogue-content {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.slag-dialogue-portrait {
  width: 76px;
  height: 76px;
  background: #110e0c;
  border: 1px solid #5a5040;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.slag-dialogue-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 6%;
  image-rendering: pixelated;
}

.slag-dialogue-text-wrap {
  flex: 1;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.slag-dialogue-text {
  color: #f0e8e0;
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  text-shadow: 1px 1px 0 #000;
}

.slag-dialogue-prompt {
  align-self: flex-end;
  color: #c9a227;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  margin-top: 8px;
  animation: slagBlink 1s infinite alternate;
}

@keyframes slagBlink {
  from { opacity: 0.6; }
  to { opacity: 1.0; }
}

/* --- Choices Box --- */
#slagChoicesPanel {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: min(520px, 94vw);
  background: rgba(24, 21, 18, 0.98);
  border: 1px solid #c9a227;
  border-radius: 2px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.9);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
}

.slag-choices-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 6px 4px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.3);
}

.slag-player-portrait {
  width: 28px;
  height: 28px;
  border: 1px solid #8a8070;
  background: #151210;
  overflow: hidden;
}

.slag-player-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 6%;
  image-rendering: pixelated;
}

.slag-choices-title {
  color: #c9a227;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.slag-choice-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(45, 38, 30, 0.4);
  border: 1px solid transparent;
  color: #c4b5a5;
  font-size: 14px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.1s ease;
}

.slag-choice-item:hover, .slag-choice-item.selected {
  background: #3f3a2a;
  border-color: #c9a227;
  color: #ffeb9e;
  transform: translateX(3px);
}

.slag-choice-num {
  color: #c9a227;
  font-weight: bold;
  font-size: 13px;
  min-width: 22px;
}

.slag-choice-lane {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  margin-left: auto;
  opacity: 0.7;
}

.slag-lane-straight { background: #2b3b2b; color: #a3d9a5; }
.slag-lane-nosy     { background: #2b3445; color: #9ec5ff; }
.slag-lane-cheeky   { background: #452b34; color: #ffa8b8; }

/* --- Toasts (Top-Center) --- */
#slagToastContainer {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  font-family: 'Courier New', monospace;
}

.slag-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(24, 21, 18, 0.95);
  border: 1px solid #c9a227;
  color: #ffeb9e;
  padding: 8px 18px;
  border-radius: 3px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
  transform: translateY(-40px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.slag-toast-checklist {
  border-color: #70b840;
  color: #d4f5b8;
}

.slag-toast.slag-toast-enter {
  transform: translateY(0);
  opacity: 1;
}

.slag-toast.slag-toast-exit {
  transform: translateY(-30px);
  opacity: 0;
}

.slag-toast-icon {
  font-size: 20px;
}

.slag-toast-title {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.slag-toast-sub {
  font-size: 12px;
  opacity: 0.85;
}

/* --- Pocket Inventory Modal (Slot Grid & Inspector) --- */
#slagInventoryModal {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 7, 0.84);
  backdrop-filter: blur(4px);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', monospace;
}

.slag-inv-panel {
  width: min(780px, 94vw);
  background: rgba(22, 19, 16, 0.98);
  border: 2px solid #8a8070;
  box-shadow: 0 14px 48px rgba(0,0,0,0.95);
  display: flex;
  flex-direction: column;
  border-radius: 3px;
  overflow: hidden;
}

.slag-inv-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #181412;
  border-bottom: 2px solid #5a5040;
  padding: 10px 16px;
}

.slag-inv-titlebar-left {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.slag-inv-title {
  color: #ffeb9e;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 1.5px;
}

.slag-inv-count {
  color: #8a8070;
  font-size: 12px;
  letter-spacing: 1px;
}

.slag-inv-close {
  color: #a89888;
  font-size: 12px;
  cursor: pointer;
}

.slag-inv-close:hover {
  color: #fff;
}

.slag-inv-body {
  display: flex;
  min-height: 320px;
  max-height: 70vh;
}

.slag-inv-grid-wrap {
  padding: 18px;
  background: rgba(16, 14, 12, 0.9);
  border-right: 2px solid #4a4034;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.slag-inv-grid {
  display: grid;
  grid-template-columns: repeat(4, 76px);
  grid-template-rows: repeat(3, 76px);
  gap: 10px;
}

.slag-inv-slot {
  width: 76px;
  height: 76px;
  border-radius: 3px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
  transition: all 0.12s ease;
}

.slag-inv-slot.empty {
  background: rgba(26, 22, 18, 0.6);
  border: 1px dashed #423b32;
  color: #524a3e;
}

.slag-inv-slot-empty-dot {
  font-size: 16px;
  opacity: 0.35;
}

.slag-inv-slot.occupied {
  background: rgba(38, 33, 27, 0.95);
  border: 2px solid #6e6250;
  cursor: pointer;
  padding: 4px;
}

.slag-inv-slot.occupied:hover,
.slag-inv-slot.occupied:focus {
  background: #3e362a;
  border-color: #c9a227;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.45);
  outline: none;
}

.slag-inv-slot.occupied.selected {
  border-color: #ffeb9e;
  background: #463d2f;
  box-shadow: 0 0 10px rgba(255, 235, 158, 0.4);
}

.slag-inv-slot-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 3px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.slag-inv-slot-label {
  font-size: 10px;
  color: #d8cec4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
  line-height: 1.1;
}

.slag-inv-inspector {
  flex: 1;
  padding: 18px 20px;
  background: rgba(24, 20, 17, 0.95);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.slag-inv-insp-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #5a5040;
  margin-bottom: 12px;
}

.slag-inv-insp-icon {
  font-size: 32px;
}

.slag-inv-insp-title {
  color: #ffeb9e;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.slag-inv-insp-desc {
  color: #d8cec4;
  font-size: 13px;
  line-height: 1.5;
}

.slag-inv-insp-empty {
  margin: auto;
  text-align: center;
  color: #7a7062;
  font-style: italic;
  padding: 30px 10px;
  font-size: 13px;
}

.slag-checklist-wrap {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(16, 14, 12, 0.85);
  border: 1px solid #4a4034;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.slag-checklist-header {
  color: #c9a227;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.slag-checklist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c4b5a5;
  font-size: 12px;
  line-height: 1.3;
}

.slag-checklist-row.slag-checklist-done {
  color: #70b840;
  text-decoration: line-through;
  opacity: 0.75;
}

.slag-check-box {
  font-size: 14px;
  min-width: 16px;
}
