/* 外链跳转提醒 — Xiuno 前台样式 */
.elg-root {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.elg-root[hidden] {
    display: none !important;
}

body.elg-lock {
    overflow: hidden;
}

.elg-mask {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .58);
    animation: elg-fade-in .2s ease-out;
}

.elg-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 24px 24px 20px;
    background: var(--content-background-color, #fff);
    color: var(--bs-body-color, #5b5b5b);
    border: 1px solid var(--bs-border-color, #e8e8e8);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
    box-sizing: border-box;
    animation: elg-pop-in .2s ease-out;
}

.elg-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--bs-secondary, #7e8299);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.elg-close:hover {
    background: var(--bs-secondary-pale, #f3f6f9);
    color: var(--bs-body-color, #5b5b5b);
}

.elg-title {
    margin: 0 0 12px;
    padding-right: 28px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--bs-body-color, #5b5b5b);
}

.elg-desc {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--bs-secondary, #7e8299);
}

.elg-host {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--bs-primary, #7888fc);
    word-break: break-all;
    overflow-wrap: anywhere;
}

.elg-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--bs-secondary, #7e8299);
}

.elg-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.elg-btn-go {
    text-decoration: none !important;
}

@keyframes elg-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes elg-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .elg-mask,
    .elg-dialog {
        animation: none;
    }
}

@media (max-width: 480px) {
    .elg-root {
        padding: 12px;
    }
    .elg-dialog {
        max-width: none;
        max-height: calc(100vh - 24px);
        padding: 20px 18px 16px;
    }
    .elg-title {
        font-size: 16px;
    }
    .elg-actions {
        justify-content: stretch;
    }
    .elg-actions .elg-btn-stay,
    .elg-actions .elg-btn-go {
        flex: 1 1 auto;
    }
}
