/* Dialog System Styling */

/* Dialog overlay */
#dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.90);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#dialog-overlay.active {
    display: flex;
    opacity: 1;
}

/* Dialog container */
.dialog-container {
    background-color: #1a1a1a;
    border: 2px solid #6bffb8;
    width: 700px;
    max-height: 80%;
    display: flex;
    flex-direction: column;
}

/* Character info header */
.dialog-header {
    background-color: #0d0d0d;
    border-bottom: 2px solid #6bffb8;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.dialog-portrait {
    width: 80px;
    height: 80px;
    border: 2px solid #6bffb8;
    background-color: #2a2a2a;
    flex-shrink: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.dialog-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.dialog-character-info {
    flex: 1;
}

.dialog-character-name {
    font-family: 'NotJam Old Style', serif;
    font-size: 24px;
    color: #6bffb8;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.dialog-character-title {
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 12px;
    color: #ff8c5a;
}

/* Dialog content area */
.dialog-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.dialog-text {
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #ffffff;
    margin-bottom: 20px;
}

/* Dialog choices */
.dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.dialog-choice {
    background-color: #2a2a2a;
    border: 2px solid #6bffb8;
    padding: 15px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    font-size: 13px;
    color: #6bffb8;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-align: left;
}

.dialog-choice:hover {
    background-color: #3a3a3a;
    border-color: #8bffcc;
}

.dialog-choice:active {
    background-color: #6bffb8;
    color: #000;
}

/* Close button */
.dialog-close {
    background-color: #ff6b35;
    border: none;
    color: #000;
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'Ark Pixel 10px', monospace;
    text-transform: uppercase;
    font-size: 10px;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.dialog-close:hover {
    background-color: #ff8c5a;
}

/* Return item button - special green styling */
.dialog-choice.return-item {
    border-color: #ffcc00;
    color: #ffcc00;
    font-weight: bold;
}

.dialog-choice.return-item:hover {
    background-color: #3a3a00;
    border-color: #ffee00;
}

/* Quest indicator */
.quest-indicator {
    display: inline-block;
    color: #ffcc00;
    margin-left: 8px;
    font-size: 14px;
}

/* Text size variants */
body.text-small .dialog-character-name { font-size: 22px; }
body.text-small .dialog-character-title { font-size: 10px; }
body.text-small .dialog-text { font-size: 12px; }
body.text-small .dialog-choice { font-size: 11px; }
body.text-small .dialog-close { font-size: 9px; }

body.text-medium .dialog-character-name { font-size: 24px; }
body.text-medium .dialog-character-title { font-size: 12px; }
body.text-medium .dialog-text { font-size: 14px; }
body.text-medium .dialog-choice { font-size: 13px; }
body.text-medium .dialog-close { font-size: 10px; }

body.text-large .dialog-character-name { font-size: 26px; }
body.text-large .dialog-character-title { font-size: 14px; }
body.text-large .dialog-text { font-size: 16px; }
body.text-large .dialog-choice { font-size: 15px; }
body.text-large .dialog-close { font-size: 12px; }

body.text-xlarge .dialog-character-name { font-size: 28px; }
body.text-xlarge .dialog-character-title { font-size: 16px; }
body.text-xlarge .dialog-text { font-size: 18px; }
body.text-xlarge .dialog-choice { font-size: 17px; }
body.text-xlarge .dialog-close { font-size: 14px; }
