/* 弹窗模板，结构对齐 autowordcursor 的 modal.css。点遮罩不会关闭。 */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay--show {
    opacity: 1;
    visibility: visible;
    overscroll-behavior: none;
}

body.modal-scroll-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(22, 93, 255, 0.16);
    overflow: hidden;
    transform: scale(0.95) translateY(-16px);
    transition: transform 0.25s ease;
}

.modal-overlay--show .modal-card {
    transform: scale(1) translateY(0);
}

.modal-card--large {
    max-width: 760px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #e8f3ff 0%, #f5f8ff 100%);
}

.modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--text, #1d2129);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-2, #4e5969);
    cursor: pointer;
}

.modal-close:hover {
    background: #fff;
    color: var(--brand, #165dff);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    color: var(--text, #1d2129);
    line-height: 1.7;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 4px 24px 20px;
}

.modal-footer:empty {
    display: none;
}
