﻿/* =============================================================
   LOCATION & DIALOGUE SYSTEM STYLES
   Location board panel, NPC dialogue modal, quest log,
   NPC shop, completed quests modal.
   Source: original styles.css lines 10989-11624
   ============================================================= */
/* ===== LOCATION & DIALOGUE SYSTEM ===== */

.location-characters-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 415px;
  max-height: 400px;
  background: rgba(20, 10, 35, 0.95);
  border: 2px solid #8a67ff;
  border-radius: 10px;
  padding: 15px;
  overflow-y: auto;
  z-index: 100;
}

.location-characters-panel .location-characters-header{display:flex;align-items:center;justify-content:space-between}
.location-characters-panel .toggle-button{
  background: linear-gradient(135deg,#8a67ff,#6f4fe6);
  border: 2px solid #d4af37;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}
.location-characters-panel.collapsed{
  width: 48px;
  max-height: 48px;
  height: 48px;
  padding: 6px;
  overflow: visible;
}
.location-characters-panel.collapsed h3,
.location-characters-panel.collapsed h4,
.location-characters-panel.collapsed #characters-at-location {
  display: none;
}

.location-characters-panel h3 {
  color: #d4af37;
  margin-bottom: 10px;
  font-size: 1.2em;
  text-align: center;
}

.location-characters-panel h4 {
  color: #8a67ff;
  margin: 15px 0 10px 0;
  font-size: 1em;
  border-bottom: 1px solid #8a67ff;
  padding-bottom: 5px;
}

#characters-at-location {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.character-at-location {
  background: rgba(30, 20, 45, 0.8);
  border: 2px solid;
  border-radius: 8px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
  margin-bottom: 10px;
}

.character-portrait-small {
  width: 60px;
  height: 60px;
  border-radius: 5px;
  border: 2px solid #d4af37;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 5px;
}

.dialogue-portrait {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  border: 3px solid #FFD700;
  object-fit: cover;
  margin-right: 15px;
}

.dialogue-header-text {
  flex: 1;
}


.character-at-location:hover {
  background: rgba(40, 30, 55, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 103, 255, 0.4);
}

.npc-character {
  border-color: #FFD700;
}

.player-character {
  border-color: #0f0;
}

.character-info {
  flex: 1;
}

.character-name {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 3px;
}

.character-details {
  font-size: 0.9em;
  color: #d4af37;
  font-style: italic;
  margin-bottom: 3px;
}

.character-class {
  font-size: 0.85em;
  color: #aaa;
}

.character-owner {
  font-size: 0.8em;
  color: #888;
  margin-top: 3px;
}

.talk-button {
  padding: 8px 15px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: 2px solid #d4af37;
  border-radius: 5px;
  color: #1a0f2e;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.talk-button:hover {
  background: linear-gradient(135deg, #FFE44D, #FFB84D);
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(255, 215, 0, 0.5);
}

.empty-state {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 20px;
}

/* Dialogue Modal */
.dialogue-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialogue-content {
  background: linear-gradient(135deg, #1a0f2e 0%, #2a1f3e 100%);
  border: 3px solid #d4af37;
  border-radius: 15px;
  padding: 0;
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.dialogue-header {
  background: linear-gradient(135deg, #8a67ff, #a87eff);
  padding: 15px 20px;
  border-bottom: 2px solid #d4af37;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialogue-header h2 {
  color: #fff;
  margin: 0;
  font-size: 1.5em;
}

.npc-title {
  color: #FFD700;
  font-style: italic;
  font-size: 0.9em;
  margin: 5px 0 0 0;
}

.close-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #fff;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  color: #fff;
  font-size: 1.2em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.dialogue-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: rgba(10, 6, 18, 0.5);
  min-height: 100px;
}

.dialogue-line {
  color: #e8d4a0;
  font-size: 1.05em;
  line-height: 1.6;
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(20, 10, 35, 0.5);
  border-left: 3px solid #8a67ff;
  border-radius: 5px;
}

.dialogue-line:last-child {
  margin-bottom: 0;
}

.dialogue-options {
  padding: 15px;
  background: rgba(15, 10, 25, 0.8);
  border-top: 2px solid #8a67ff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dialogue-option {
  padding: 12px 20px;
  background: linear-gradient(135deg, #8a67ff, #6a47df);
  border: 2px solid #d4af37;
  border-radius: 8px;
  color: #fff;
  font-size: 1em;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
}

.dialogue-option:hover {
  background: linear-gradient(135deg, #9a77ff, #7a57ef);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(138, 103, 255, 0.5);
}

/* Quest Tracker Banner */
.quest-tracker {
  width: 100%;
  background: linear-gradient(135deg, rgba(26,15,46,.92), rgba(42,31,62,.92));
  border: 1px solid rgba(212,175,55,.4);
  border-radius: 8px;
  padding: .5rem .85rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  transition: border-color .2s;
}
.quest-tracker:hover {
  border-color: rgba(212,175,55,.75);
}
.quest-tracker-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.quest-tracker-body {
  flex: 1;
  min-width: 0;
}
.quest-tracker-title {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  font-weight: 600;
  color: #d4af37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quest-tracker-objective {
  font-size: .75rem;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: .1rem;
}
.quest-tracker-hint {
  font-size: .68rem;
  color: rgba(138,103,255,.85);
  font-style: italic;
  margin-top: .1rem;
}
.quest-tracker-tap {
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  flex-shrink: 0;
  align-self: center;
}

/* Quest Log Modal */
.quest-log-content {
  background: linear-gradient(135deg, #1a0f2e 0%, #2a1f3e 100%);
  border: 3px solid #d4af37;
  border-radius: 15px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.quest-log-header {
  background: linear-gradient(135deg, #8a67ff, #a87eff);
  padding: 15px 20px;
  border-bottom: 2px solid #d4af37;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quest-log-header h2 {
  color: #fff;
  margin: 0;
  font-size: 1.5em;
}

.quest-log-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: rgba(10, 6, 18, 0.5);
}

.quest-log-body h3 {
  color: #d4af37;
  margin: 20px 0 10px 0;
  font-size: 1.3em;
  border-bottom: 2px solid #8a67ff;
  padding-bottom: 5px;
}

.quest-log-body h3:first-child {
  margin-top: 0;
}

.quest-entry {
  background: rgba(20, 10, 35, 0.7);
  border: 2px solid;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s;
}

.quest-entry:hover {
  background: rgba(30, 20, 45, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(138, 103, 255, 0.3);
}

.active-quest {
  border-color: #FFD700;
}

.completed-quest {
  border-color: #4CAF50;
  opacity: 0.8;
}

.quest-entry h4 {
  color: #d4af37;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.quest-entry p {
  color: #e8d4a0;
  margin-bottom: 15px;
  line-height: 1.5;
}

.quest-objectives {
  margin-top: 10px;
  padding-left: 10px;
}

.objective {
  color: #ccc;
  margin: 8px 0;
  padding: 8px;
  background: rgba(10, 6, 18, 0.5);
  border-left: 3px solid #8a67ff;
  border-radius: 3px;
  font-size: 0.95em;
}

.objective.completed {
  color: #4CAF50;
  border-left-color: #4CAF50;
  text-decoration: line-through;
}

/* NPC Shop Styles */
.npc-shop-section {
  border-top: 2px solid #d4af37;
  margin-top: 15px;
  padding: 15px;
  background: rgba(10, 5, 20, 0.5);
}

.npc-shop-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.npc-shop-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(30, 20, 45, 0.6);
  border: 2px solid #663399;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.3s;
}

.npc-shop-item:hover {
  background: rgba(40, 30, 55, 0.8);
  border-color: #8a67ff;
  transform: translateY(-2px);
}

.npc-shop-item-icon {
  font-size: 2em;
  flex-shrink: 0;
  width: 50px;
  text-align: center;
}

.npc-shop-item-info {
  flex: 1;
}

.npc-shop-item-name {
  color: #FFD700;
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 5px;
}

.npc-shop-item-description {
  color: #d4af37;
  font-size: 0.9em;
  font-style: italic;
}

.npc-shop-item-price {
  color: #FFA500;
  font-weight: bold;
  font-size: 1.2em;
  margin-right: 10px;
  flex-shrink: 0;
}

.npc-shop-buy-btn {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border: 2px solid #d4af37;
  border-radius: 5px;
  padding: 8px 20px;
  color: #1a0f2e;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
}

.npc-shop-buy-btn:hover {
  background: linear-gradient(135deg, #FFE44D, #FFB84D);
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(255, 215, 0, 0.5);
}
/* Completed Quests Modal */
.completed-quests-container {
  padding: 20px;
}

.completed-quest-card {
  background: linear-gradient(135deg, #1a0f2e, #2a1f3e);
  border: 2px solid #4CAF50;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
}

.completed-quest-card:hover {
  border-color: #5FD866;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
  transform: translateY(-3px);
}

.quest-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(76, 175, 80, 0.3);
}

.quest-card-header h3 {
  color: #d4af37;
  margin: 0;
  font-size: 1.4em;
}

.quest-completion-badge {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 0.9em;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.4);
}

.quest-description {
  color: #b8a878;
  margin-bottom: 15px;
  font-size: 1em;
  line-height: 1.5;
}

.quest-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(10, 6, 18, 0.5);
  border-radius: 8px;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.metadata-label {
  color: #8a67ff;
  font-size: 0.85em;
  font-weight: bold;
}

.metadata-value {
  color: #e8d4a0;
  font-size: 1em;
}

.quest-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.quest-rewards strong {
  width: 100%;
  color: #d4af37;
  margin-bottom: 5px;
}

.reward-item {
  background: rgba(138, 103, 255, 0.2);
  padding: 5px 12px;
  border-radius: 15px;
  color: #e8d4a0;
  font-size: 0.9em;
  border: 1px solid rgba(138, 103, 255, 0.4);
}

.quest-log-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.view-completed-quests-btn {
  padding: 8px 15px;
  background: linear-gradient(135deg, #4169e1, #1e3a8a);
  color: white;
  border: 2px solid #4169e1;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  white-space: nowrap;
}

.view-completed-quests-btn:hover {
  background: linear-gradient(135deg, #5179f1, #2e4a9a);
  box-shadow: 0 0 15px rgba(65, 105, 225, 0.5);
  transform: translateY(-2px);
}

/* Skill Tree Animations */
@keyframes pulse-available {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes successFadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}
