/**
 * NPC Dialog Modal Styles
 *
 * Layout: NPC portrait on left, dialog content center, character portrait on right
 * Uses HexUI CSS variables for consistency.
 */

/* Main dialog container */
.npc-dialog-container {
  display: flex;
  gap: 16px;
  height: 100%;
  min-height: 320px;
}

/* Portrait columns - left for NPC, right for characters */
.npc-dialog-portrait-col {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px;
}

.npc-dialog-portrait-col.npc-side {
  /* NPC on left - slightly darker background */
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.npc-dialog-portrait-col.character-side {
  /* Character(s) on right - for future use */
}

/* Portrait frame */
.npc-dialog-portrait {
  width: 140px;
  height: 200px;
  border: 3px solid var(--border-light, rgba(212, 175, 55, 0.5));
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.npc-dialog-portrait.large {
  width: 160px;
  height: 240px;
  border-width: 3px;
}

.npc-dialog-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.npc-dialog-portrait .portrait-placeholder {
  font-size: 48px;
  opacity: 0.3;
}

/* Name label under portrait */
.npc-dialog-portrait-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-accent, #d4af37);
  text-align: center;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.npc-dialog-portrait-title {
  font-size: 11px;
  color: var(--text-secondary, #a0a0a0);
  text-align: center;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: -4px;
}

/* Center content area */
.npc-dialog-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* Dialog header with name and chat button */
.npc-dialog-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-dark, rgba(212, 175, 55, 0.2));
}

.npc-dialog-header-info {
  flex: 1;
}

.npc-dialog-name {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-accent, #d4af37);
}

.npc-dialog-title {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary, #a0a0a0);
}

/* Chat button in header */
.npc-dialog-chat-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  color: var(--text-accent, #d4af37);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}

.npc-dialog-chat-btn:hover {
  background: rgba(212, 175, 55, 0.3);
  transform: scale(1.05);
}

.npc-dialog-chat-btn svg {
  width: 18px;
  height: 18px;
}

/* Dialog text box */
.npc-dialog-text-box {
  padding: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border-left: 3px solid var(--text-accent, #d4af37);
}

.npc-dialog-text {
  margin: 0;
  line-height: 1.6;
  color: var(--text-primary, #e0e0e0);
  font-size: 14px;
}

/* Response buttons area */
.npc-dialog-responses {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  justify-content: center;
  padding-top: 12px;
}

/* Response button styling */
.npc-response-btn {
  padding: 10px 20px;
  background: rgba(212, 175, 55, 0.15);
  border: 2px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  color: var(--text-primary, #e0e0e0);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 100%;
  text-align: center;
  line-height: 1.4;
}

.npc-response-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.7);
  color: var(--text-accent, #d4af37);
  transform: translateY(-1px);
}

.npc-response-btn:active {
  transform: translateY(0);
  background: rgba(212, 175, 55, 0.3);
}

/* Character column - hidden until implemented */
.npc-dialog-portrait-col.character-side {
  display: none;
}

/* Character portrait placeholder for future use */
.character-portrait-placeholder {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border-dark, rgba(212, 175, 55, 0.2));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
}

.character-portrait-placeholder span {
  font-size: 32px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .npc-dialog-container {
    flex-direction: column;
    gap: 12px;
  }

  .npc-dialog-portrait-col {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    padding: 12px;
  }

  .npc-dialog-portrait-col.character-side {
    display: none;
  }

  .npc-dialog-portrait {
    width: 80px;
    height: 120px;
  }

  .npc-dialog-portrait.large {
    width: 80px;
    height: 120px;
  }

  .npc-dialog-portrait-name,
  .npc-dialog-portrait-title {
    text-align: left;
  }
}
