/* ===== Modal 确认对话框样式（仅用于 confirm） ===== */

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2147483640;
    opacity: 0;
    transition: opacity .25s ease;
    -webkit-tap-highlight-color: transparent;
}

.custom-modal-overlay-visible {
    opacity: 1;
}

.custom-modal-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    z-index: 2147483641;
    min-width: 340px;
    max-width: min(460px, 90vw);
    max-height: 90vh;
    overflow: hidden;
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}

.custom-modal-container-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.custom-modal-header {
    padding: 20px 22px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.custom-modal-icon {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.custom-modal-icon svg {
    width: 15px;
    height: 15px;
}

.custom-modal-icon-confirm {
    color: #7c3aed;
    background: #ede9fe;
}

.custom-modal-close {
    border: 0;
    background: transparent;
    color: #9ca3af;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .15s, background .15s;
}

.custom-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.custom-modal-body {
    padding: 6px 22px 18px;
}

.custom-modal-message {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.55;
    margin: 0;
}

.custom-modal-footer {
    padding: 14px 22px 18px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.custom-modal-btn {
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
    min-width: 72px;
    -webkit-tap-highlight-color: transparent;
}

.custom-modal-btn-primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.custom-modal-btn-primary:hover {
    background: #1f2937;
}

.custom-modal-btn-primary:active {
    background: #374151;
    transform: scale(0.98);
}

.custom-modal-btn-secondary {
    background: #fff;
    color: #6b7280;
    border-color: #d1d5db;
}

.custom-modal-btn-secondary:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
}

.custom-modal-btn-secondary:active {
    background: #f3f4f6;
    transform: scale(0.98);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .custom-modal-container {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }

    .custom-modal-footer {
        flex-direction: column-reverse;
    }

    .custom-modal-btn {
        width: 100%;
        padding: 10px 20px;
    }
}
