/* =====================================================
   OSRS-Style NPC Dialogue System
   ===================================================== */

/* Overlay covers the chatbox content area */
.osrs-dialogue-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background: var(--df-bg-card, #1a1a2e);
    border: 1px solid var(--df-border-bright, #c8a254);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 8px 12px;
    overflow: hidden;
}

/* NPC Chat layout */
.osrs-dialogue-box {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

/* NPC Chathead image */
.osrs-dialogue-chathead {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid var(--df-border-bright, #c8a254);
    border-radius: 4px;
    background: #0d0d1a;
    overflow: hidden;
    position: relative;
}

.osrs-dialogue-chathead img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Player "chathead" placeholder */
.osrs-dialogue-chathead.player-head {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--df-gold, #c8a254);
}

/* Content area (speaker name + text) */
.osrs-dialogue-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* Speaker name */
.osrs-dialogue-speaker {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dialogue text */
.osrs-dialogue-text {
    font-family: 'Crimson Text', serif;
    font-size: 15px;
    line-height: 1.4;
    color: var(--df-text-bright, #e8dcc8);
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
}

/* "Click here to continue" prompt */
.osrs-dialogue-continue {
    font-family: 'Crimson Text', serif;
    font-size: 13px;
    color: var(--df-accent-warm, #d4763c);
    text-align: center;
    margin-top: 6px;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    animation: dialoguePulse 1.5s ease-in-out infinite;
}

.osrs-dialogue-continue:hover {
    opacity: 1;
    text-decoration: underline;
}

@keyframes dialoguePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== Choice Layout ===== */
.osrs-dialogue-choices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.osrs-dialogue-prompt {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    margin-bottom: 4px;
}

.osrs-dialogue-option {
    font-family: 'Crimson Text', serif;
    font-size: 14px;
    color: var(--df-text-bright, #e8dcc8);
    cursor: pointer;
    padding: 3px 12px;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.15s;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

.osrs-dialogue-option:hover {
    color: var(--df-gold, #c8a254);
    border-color: var(--df-border-bright, #c8a254);
    background: rgba(200, 162, 84, 0.08);
}

.osrs-dialogue-option .option-number {
    font-weight: 700;
    color: var(--df-gold, #c8a254);
    margin-right: 6px;
}

/* ===== Quest notification banners ===== */
.osrs-dialogue-quest-banner {
    text-align: center;
    padding: 8px;
    margin-top: 4px;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
}

.osrs-dialogue-quest-banner.quest-started {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.osrs-dialogue-quest-banner.quest-completed {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
