@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&display=swap');

:root {
    /* Dialogue-box chrome tokens. (The editor-only tokens --accent/--accent-deep/
       --accent-bright/--panel-border moved to the creator's editor.css.) */
    --chip-bg: rgba(18, 18, 18, 0.85);
    --chip-border: #272727;
    --muted: #838383;

    /* ── themeable dialogue-suite variables (overridden by the creator's Theme tab) ── */
    --vsnd-accent: #ff197e;
    --vsnd-panel: #0b0c0e;
    --vsnd-panel-bg: linear-gradient(180deg, rgba(11, 12, 14, 0.82) 0%, rgba(11, 12, 14, 0.94) 100%);
    --vsnd-border: #2b2a26;
    --vsnd-text: #e8e8e8;
    --vsnd-font: 'Rajdhani', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
}

.hidden {
    display: none !important;
}

/* The themed font must beat the `* { font-family: Rajdhani }` reset above, which
   otherwise sets Rajdhani directly on every dialogue child. Higher specificity wins. */
#dialog-box, #dialog-box *,
#todo-box, #todo-box *,
.toast { font-family: var(--vsnd-font); }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── DIALOGUE BOX ────────────────────────────────────────────────────────── */

#dialog-wrapper {
    position: absolute;
    bottom: 8%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

#dialog-box {
    width: 616px;
    display: flex;
    flex-direction: column;
    padding: 22px 22px 22px 24px;
    background: var(--vsnd-panel-bg);
    border: 1px solid var(--vsnd-border);
    border-radius: 10px;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65);
    pointer-events: auto;
    font-family: var(--vsnd-font);
    animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Header: avatar + name / group · rep */
#dialog-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

#dialog-avatar {
    width: 59px;
    height: 59px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #454545;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 59 59'%3E%3Ccircle cx='29.5' cy='23' r='11' fill='%238f8f8f'/%3E%3Cpath d='M11 55c0-10.5 8.3-17 18.5-17S48 44.5 48 55z' fill='%238f8f8f'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45);
}

#dialog-avatar.has-avatar {
    background-color: transparent;
}

#dialog-headtext {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

#dialog-speaker {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1;
}

#dialog-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    line-height: 1;
}

#dialog-subtitle .subtitle-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--vsnd-accent);
    flex-shrink: 0;
    /* optical centering: uppercase caps sit above the line-box middle */
    transform: translateY(-1px);
}

/* Prompt text */
#dialog-text {
    margin-top: 18px;
    color: var(--vsnd-text);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.4;
    min-height: 24px;
}

/* Options */
#dialog-options {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialog-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 43px;
    padding: 0 12px;
    background: rgba(22, 22, 22, 0.85);
    border: 1px solid var(--chip-border);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.dialog-option .opt-key {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: 2.5px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.dialog-option .opt-label {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.15;
}

/* Selected / hovered choice — driven by the themed accent */
.dialog-option.selected {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)), var(--vsnd-accent);
    border-color: var(--vsnd-accent);
}

.dialog-option.selected .opt-key {
    background: rgba(0, 0, 0, 0.28);
    border-color: var(--vsnd-accent);
}

/* Selection caret to the left of the active choice */
.dialog-option.selected::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 0 6px 7px;
    border-color: transparent transparent transparent var(--vsnd-accent);
}

/* Footer: key hints */
#dialog-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 26px;
}

.dlg-key-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dlg-key {
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    border-radius: 2.5px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.dlg-key-arrow {
    padding: 0;
    font-size: 13px;
}

.dlg-key-label {
    margin-left: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

/* (Objectives/TODO HUD styles removed — that HUD is consumer-side UI now; the heist
   ships its own. Dialogue resource = dialogues + creator only.) */

/* Notifications use ox_lib's lib.notify — there is no custom toast UI here. */
