/* ═══════════════════════════════════════════════════════
   theme-dialog.css  —  Ocarina of Time dialog box style
   ═══════════════════════════════════════════════════════ */

@font-face {
    font-family: 'ChiaroNormal';
    src: url('../fonts/ChiaroNormal.woff2') format('woff2'),
         url('../fonts/ChiaroNormal.otf')   format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'ZeldaDX';
    src: url('../fonts/ZeldaDXTTBRK.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --dialog-bg:     rgba(12, 12, 16, 0.69);
    --dialog-text:   #f8f8ff;
    --dialog-muted:  #9090b0;
    --dialog-cursor: #3a8fff;
}

.theme-dialog {
    font-family: 'ChiaroNormal', monospace;
}

/* ── header ─────────────────────────────────────────── */
/* Mimics the OoT name box that appears above dialog */
.theme-dialog #header {
    background: var(--dialog-bg);
    border-radius: 16px;
    padding: 6px 16px;
}

.theme-dialog #header .title {
    font-family: 'ZeldaDX', 'ChiaroNormal', monospace;
    font-size: 12px;
    color: var(--dialog-text);
    text-shadow: var(--outline);
    letter-spacing: 0.06em;
}

.theme-dialog #header .game-label {
    font-size: 9px;
    color: var(--dialog-muted);
    text-shadow: var(--outline);
}

/* ── feed ────────────────────────────────────────────── */
.theme-dialog #feed { gap: 5px; }

/* ── dialog box cards ────────────────────────────────── */
.theme-dialog .entry {
    background: var(--dialog-bg);
    border-radius: 16px;
    padding: 8px 20px 16px 16px;
    position: relative;
    overflow: visible;
    animation: dialogIn 0.14s steps(2, end) both;
}

/* OoT-style blue ▼ cursor centered at bottom */
.theme-dialog .entry::after {
    content: '▼';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--dialog-cursor);
    text-shadow: 0 0 6px rgba(58, 143, 255, 0.7);
    animation: dialogCursor 1.2s ease-in-out infinite;
}

/* ── item name ───────────────────────────────────────── */
.theme-dialog .d-name {
    font-family: 'ChiaroNormal', monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: var(--outline);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 14px; /* avoid cursor overlap */
}

/* type colors — keep them readable on dark navy */
.theme-dialog .entry.prog   .d-name { color: var(--prog); }
.theme-dialog .entry.useful .d-name { color: var(--useful); }
.theme-dialog .entry.trap   .d-name { color: var(--trap); }
.theme-dialog .entry.normal .d-name { color: var(--dialog-text); }

/* ── badge ───────────────────────────────────────────── */
.theme-dialog .d-badge {
    font-size: 7px;
    padding: 1px 4px;
    border: 1px solid currentColor;
    border-radius: 2px;
    flex-shrink: 0;
    line-height: 1.4;
    text-shadow: none;
    opacity: 0.85;
}

/* ── meta row ────────────────────────────────────────── */
.theme-dialog .d-meta {
    font-size: 10px;
    color: var(--dialog-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: var(--outline);
    line-height: 1.5;
    padding-right: 14px; /* avoid cursor overlap */
}

.theme-dialog .slot-name {
    text-shadow: var(--outline);
}

.theme-dialog .d-sep {
    color: rgba(136, 136, 204, 0.45);
    margin: 0 3px;
}

/* ── animations ──────────────────────────────────────── */
@keyframes dialogIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* gentle hover bob matching OoT */
@keyframes dialogCursor {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(3px); }
}

.theme-dialog .entry.removing {
    animation: dialogOut 0.14s steps(2, end) forwards;
}

@keyframes dialogOut {
    to {
        opacity: 0;
        max-height: 0;
        padding: 0 12px;
        margin: 0;
        border-width: 0;
        box-shadow: none;
    }
}
