/* Shared confirm / alert dialog — no browser alert() / confirm() */
.vrc-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.vrc-dialog-root.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vrc-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.vrc-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 400px);
    padding: 24px 22px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.18s ease;
}

.vrc-dialog-root.is-open .vrc-dialog-panel {
    transform: translateY(0) scale(1);
}

.vrc-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    background: #fff5f5;
    color: #b91c1c;
}

.vrc-dialog-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.vrc-dialog-root[data-tone="info"] .vrc-dialog-icon {
    background: #eff6ff;
    color: #1d4ed8;
}

.vrc-dialog-root[data-tone="success"] .vrc-dialog-icon {
    background: #ecfdf5;
    color: #047857;
}

.vrc-dialog-root[data-tone="success"] .vrc-dialog-ok {
    background: #047857;
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.28);
}

.vrc-dialog-root[data-tone="danger"] .vrc-dialog-icon {
    background: #fff5f5;
    color: #b91c1c;
}

.vrc-dialog-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.vrc-dialog-message {
    margin: 0 0 20px;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #64748b;
}

.vrc-dialog-actions {
    display: flex;
    gap: 10px;
}

.vrc-dialog-actions button {
    flex: 1;
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.vrc-dialog-cancel {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.vrc-dialog-cancel:hover {
    background: #e2e8f0;
}

.vrc-dialog-ok {
    background: #e70013;
    color: #fff;
    box-shadow: 0 8px 20px rgba(231, 0, 19, 0.28);
}

.vrc-dialog-ok:hover {
    filter: brightness(1.05);
}

.vrc-dialog-root[data-tone="info"] .vrc-dialog-ok {
    background: #1d4ed8;
    box-shadow: 0 8px 20px rgba(29, 78, 216, 0.28);
}

.vrc-dialog-root.is-alert .vrc-dialog-cancel {
    display: none;
}

.vrc-dialog-root.is-alert .vrc-dialog-ok {
    flex: 1;
}

html[data-theme="dark"] .vrc-dialog-panel {
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .vrc-dialog-title {
    color: #f8fafc;
}

html[data-theme="dark"] .vrc-dialog-message {
    color: #94a3b8;
}

html[data-theme="dark"] .vrc-dialog-cancel {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}
